[cp-patches] FYI: AbstractDocument
roman at kennke.org
Mon Nov 20 10:52:53 UTC 2006
This makes the locking impl in AbstractDocument more straightforward
(and therefore, more robust, I hope). And it makes the
DefaultDocumentEvent behave a little better memory and performance wise.
It switches to HashTable usage only when exceeding a certain threshold.
2006-11-20 Roman Kennke <kennke at aicas.com>
(DefaultDocumentEvent.changes): Changed to be a HashMap.
(DefaultDocumentEvent.modified): Made private.
(DefaultDocumentEvent.THRESHOLD): New constant field.
(DefaultDocumentEvent.DefaultDocumentEvent): Don't initialize
(DefaultDocumentEvent.addEdit): Switch to hashmap only when
(DefaultDocumentEvent.getChange): Use iterative approach
when we have no hashmap yet.
(numWriters): Renamed from numWritersWaiting.
(readLock): Implement more straightforward.
(readUnlock): Implement more straightforward.
(writeLock): Implement more straightforward.
(writeUnlock): Implement more straightforward.
(remove): Write-lock here.
(removeImpl): Don't write-lock here.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 18544 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20061120/2b42b4ae/patch-0001.bin
More information about the Classpath-patches