Difference in ConcurrentHashMap and synchronized Map
|Top Tutorials||New Tutorials||Submit||Login||Register|
Total Hits: 10233
Total Votes: 139 votes
Submitted on: 2011-07-03 05:58:03
Submitted By: Javin Paul
Description:The synchronized collections classes, Hashtable and Vector, and the synchronized wrapper classes, Collections.synchronizedMap and Collections.synchronizedList, provide a basic conditionally thread-safe implementation of Map and List. However, several factors make them unsuitable for use in highly concurrent applications for example their single collection-wide lock is an impediment to scalability and it often becomes necessary to lock a collection for a considerable time during iteration to prevent ConcurrentModificationException More detail...