« Empire Strikes Back: Directors Cut | Home | stackoverflow »
ConcurrentReferenceHashMap in Java 7?
There is an interesting proposal under discussion on the concurrency-interest mailing list to add a ConcurrentReferenceHashMap as part of JSR 166. The ConcurrentReferenceHashMap would be a combination of a concurrent map (like ConcurrentHashMap), with optional reference (like IdentityHashMap) or equality semantics, and with strong, weak, or soft keys and values (partially covered by WeakHashMap). I actually had the need recently for a concurrent, identity-based, weak hash map right now so this would have fit the bill perfectly.
The Google Collections Library has a similar animal in ReferenceMap which is concurrent, allows choosing the reference type (including phantom references), but uses equality for strong references and identity for the rest.
The proposal is being made by Jason Greene from Red Hat and you can peruse the initial source code and join the concurrency mailing list if you want to give comments.
About this entry
You’re currently reading “ConcurrentReferenceHashMap in Java 7?,” an entry on Pure Danger Tech
- Published:
- Apr 17 2008 / 8:31 am
- Category:
- Java, jdk7, collections
- Vote:
- Other posts with these tags:

5 Comments
Jump to comment form | comments rss | trackback uri