Difference in ConcurrentHashMap and synchronized Map
Tutorials Shared by the Internet Community
|Top Tutorials||New Tutorials||Submit||Login||Register|
Total Hits: 15309
Total Votes: 144 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...