ConcurrentHashMap
was introduced in 1.5 as a part java java.util.concurrent
package. Before that the only way to have a threadsafe
map was to use HashTable
or Collections.synchronizedMap(Map)
.
For all the practical purpose (multithread environment),ConcurrentHashMap
is sufficient to address the needs except one case wherein a thread needs a uniform view of the map.
My question is, apart from having a Uniform View of the map, are there any other scenarios wherein ConcurrentHashMap
is not an option ?