Re: how to make hashmap threadsafe
Posted By:
Amit_Saxena
Posted On:
Wednesday, April 26, 2006 03:48 AM
Use :
Hashmap objHashmap = Collections.synchronizedMap(new HashMap(....));
Re: how to make hashmap threadsafe
Posted By:
ankush_purwar
Posted On:
Monday, March 6, 2006 01:46 PM
Why not you prefer Hashtable because it's thread-safe ?
otherwise you can make a wrapper class around the hashmap and provide same API's as provided by HashMap and make the relevant API as synchronized.