3
votes
5answers
160 views

What is the purpose of WeakHashMap when there is HashMap and Concurrent HashMap?

What is the need arises for introducing Weak HashMap when there is already other implementations available. In short i have two issues : Why jdk has WeakHashMap when there is HashMap and ...
0
votes
1answer
36 views

ConcurrentHash map with Weak Reference

I am stuck in a problem and really need some help to go through this In my application. I have a ConcurrentHashMap where multiple can thread can store or retrieve data simultaneously. To solve this ...
2
votes
1answer
90 views

Does ConcurrentHashMap implementation use cloning in remove operation?

I was reading an IBM DeveloperWorks article to understand how ConcurrentHashMap is implemented. The section "removal operation" suggests that the removal operation is a two step process: Find the ...
5
votes
4answers
3k views

Are there any drawbacks with ConcurrentHashMap?

I need a HashMap that is accessible from multiple threads. There are two simple options, using a normal HashMap and synchronizing on it or using a ConcurrentHashMap. Since ConcurrentHashMap does not ...
16
votes
3answers
14k views

Thread safe Hash Map?

I am writing an application which will return a HashMap to user. User will get reference to this MAP. On the backend, I will be running some threads which will update the Map. What I have done so ...