[concurrency-interest] How do I replicate these in java.util.concurrent

Doug Lea dl at cs.oswego.edu
Thu Jun 30 12:42:22 EDT 2005


Nikolai V. Chr. wrote:
> 
> My question is, how do I convert these classes:
> 
> ReentrantReaderPreferenceReadWriteLock
> ReentrantWriterPreferenceReadWriteLock

Unless you have a specific need for r/w preference (which I bet you
don't), just use ReentrantReadWriteLock.

> ConcurrentReaderHashMap

Use ConcurrentHashMap with concurrency level of 1.

> PropertyChangeMulticaster

As of J2SE5.0/Tiger, the JDK version of this class
(java.beans.PropertyChangeSupport) uses
something close to a copy-on-write, so there's no longer
a need for this.

-Doug



More information about the Concurrency-interest mailing list