[concurrency-interest] ConcurrentWeakIdentityHashMap

Jason Mehrens jason_mehrens at hotmail.com
Fri Mar 30 14:10:56 EDT 2007


I hope that if any new Reference Map is added to the JDK it implements 
ConcurrentMap.  The behavior of the weak/soft references exactly align with 
the behavior of the ConcurrentMap.  Allowing null to be added to a reference 
or a ConcurrentMap has ambiguous meanings.  The WeakHashMap methods read 
just like the ConcurrentMap wrt size, isEmpty, equals, hashCode.
The WeakHashMap spec even implies that another thread (g.c)  is using the 
map.

A lot of the RFEs for new reference maps predate the ConcurrentMap.  Maybe 
they will be updated to say ConcurrentMap instead of just Map someday.

my two cents,

Jason Mehrens


>From: Gregg Wonderly <gregg at cytetech.com>
>Reply-To: gregg.wonderly at pobox.com
>To: concurrency-interest at cs.oswego.edu
>Subject: [concurrency-interest] ConcurrentWeakIdentityHashMap
>Date: Wed, 28 Mar 2007 09:19:30 -0500
>
>Is there any thought about creating a new WeakIdentityHashMap which can be 
>used
>in places where classloaders and other dynamic bindings are in use.  I've 
>not
>looked into this at any depth yet, but there are some places where 
>WeakHashMap
>are used in the Jini 2.1 codebase which I've been looking at to do some
>contention reduction.  The use of distributed key based locks in
>ConcurrentHashMap is nice for things related to threading, ClassLoader and
>ProtectionDomain issues where multiple unrelated users are active at one 
>time.
>
>Gregg Wonderly
>_______________________________________________
>Concurrency-interest mailing list
>Concurrency-interest at altair.cs.oswego.edu
>http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest

_________________________________________________________________
i'm making a difference. Make every IM count for the cause of your choice. 
Join Now. 
http://clk.atdmt.com/MSN/go/msnnkwme0080000001msn/direct/01/?href=http://im.live.com/messenger/im/home/?source=hmtagline



More information about the Concurrency-interest mailing list