Link to home
Start Free TrialLog in
Avatar of Jay Roy
Jay RoyFlag for United States of America

asked on

concurrent hashmap accuracy

If multiple threads are concurrently modifying a concurrenthashmap, how does it maintain the accuracy of data in it?

A simple answer would be highly appreciated.

thx.
SOLUTION
Avatar of for_yan
for_yan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

I guess it is different for HashTable, so if there is such issue you can use HashTable

Unlike the new collection implementations, Hashtable is synchronized.

http://download.oracle.com/javase/1.4.2/docs/api/java/util/Hashtable.html
Its worth noting that there is no synchonization of any of its methods.
 
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
:)