[concurrency-interest] CustomConcurrentHashMap feedback

Blair Zajac blair at orcaware.com
Wed Dec 30 01:33:39 EST 2009


I was looking at CustomConcurrentHashMap.KeyGen today for it's intern() 
method.  Right now I'm using Google Collection's for an intern but I 
have to write my own FinalizableSoftReference subclass that allows me to 
use equals() instead of == for determining equality.  I'm hoping to find 
a single map class that has all these features and was trying 
CustomConcurrentHashMap.

Two issues I've noticed so far with CustomConcurrentHashMap.

1) Putting a value into CustomConcurrentHashMap.KeyGen doesn't start the 
reference queue reclaiming thread.  I just tested this by putting a 
println() in ReclamationThread's constructor and it's never called.

2) In a web application will ReclamationThread prevent the web 
application from being completely unloaded?  It looks like there's 
nothing there to stop the thread when the application's class loader is 
unloaded.

Google Collections handles 2) so could be used to have ReclamationThread 
shutdown.

Happy New Year!
Blair


More information about the Concurrency-interest mailing list