[concurrency-interest] Java ConcurrentWeakHashMap

Shevek shevek at anarres.org
Mon Aug 1 15:53:58 EDT 2016


It may be a bit heavier than you require, but CacheBuilder can use 
weakKeys and is concurrent.

S.

On 08/01/2016 12:30 PM, i hack wrote:
> I can't find one in the JDK.
> Guava has one similar but it uses identity, I need it with equality.
>
> http://stackoverflow.com/questions/2255950/is-there-java-concurrent-util-or-equivalent-for-weakhashmap
> http://stackoverflow.com/questions/31875264/is-there-a-non-jdk-implementation-for-a-concurrent-weak-hash-map
>
> I came across these on the mailing list (from 3 1/2 yrs ago...):
> http://concurrency.markmail.org/search/?q=weakconcurrenthashmap#query:weakconcurrenthashmap%20order%3Arelevance+page:1+mid:swesuutrmb44jt2y+state:results
> http://gee.cs.oswego.edu/dl/jsr166/dist/extra166ydocs/
>
> But don't know what is the best option, if there is one, as of today, to
> use a ConcurrentWeakHashMap, without rolling my own.
>
> Thanks,
> IDC
>
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>


More information about the Concurrency-interest mailing list