This content has been marked as final.
Show 2 replies
-
1. Re: ConcurrentHashSet vs newSetFromMap
clebert.suconic Sep 13, 2012 4:25 PM (in response to nimo22)It would be the same...
The code exists since we were on JVM 1.4.
On 2.2, the code still needs to run in JVM 1.5 at the client.. so I would rather keep the code as it is (it's not a big deal anyways).
-
2. Re: ConcurrentHashSet vs newSetFromMap
clebert.suconic Sep 13, 2012 4:25 PM (in response to nimo22)nimo stephan wrote:
What is the difference of using this:
org.hornetq.utils.ConcurrentHashSet
private Set<Object> threadSafe= new ConcurrentHashSet<Object>();
and this:
java.util.Collections.newSetFromMap
private Set<Object> threadSafe= Collections.newSetFromMap(new ConcurrentHashMap<Object, Boolean>());
BTW: thanks for the hint.. it's always nice to learn new tricks! But I don't think we can change it now.