Class CopyOnWriteHashMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
org.elasticsearch.common.collect.CopyOnWriteHashMap<K,V>
All Implemented Interfaces:
Map<K,V>

public final class CopyOnWriteHashMap<K,V> extends AbstractMap<K,V>
An immutable map whose writes result in a new copy of the map to be created. This is essentially a hash array mapped trie: inner nodes use a bitmap in order to map hashes to slots by counting ones. In case of a collision (two values having the same 32-bits hash), a leaf node is created which stores and searches for values sequentially. Reads and writes both perform in logarithmic time. Null keys and values are not supported. This structure might need to perform several object creations per write so it is better suited for work-loads that are not too write-intensive.
See Also:
the wikipedia page