[concurrency-interest] Java ConcurrentWeakHashMap
jini at zeus.net.au
Tue Aug 2 09:18:33 EDT 2016
Would a non blocking concurrent decorator, that lets you choose identity or equality, with any ConcurrentMap implementation of your choice suffice?
Separation of concerns.
You can also choose weak, soft, timed or strong references for keys, values or entry's in any Java Collections implementation.
It can be dependency injected so your object thinks it's using a ConcurrentMap, or any other Java Collections interface for that matter. And you can change the decorated underlying implementation to which ever one works best for you.
Sent from my Samsung device.
Include original message
---- Original message ----
From: Shevek <shevek at anarres.org>
Sent: 02/08/2016 05:53:58 am
To: concurrency-interest at cs.oswego.edu
Subject: Re: [concurrency-interest] Java ConcurrentWeakHashMap
It may be a bit heavier than you require, but CacheBuilder can use
weakKeys and is concurrent.
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.
> I came across these on the mailing list (from 3 1/2 yrs ago...):
> But don't know what is the best option, if there is one, as of today, to
> use a ConcurrentWeakHashMap, without rolling my own.
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
Concurrency-interest mailing list
Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest