Class CopyOnUpdateOnceMap<K,V>
java.lang.Object
com.gigaspaces.internal.utils.collections.CopyOnUpdateOnceMap<K,V>
- All Implemented Interfaces:
ConcurrentMap<K,V>, Map<K, V>
Provides a ConcurrentMap implementation. This implementation is based on CopyOnUpdate for each
modifying operation. However the internal map is not volatile, meaning a modification may not be
visible to a following read, hence this map should be used when in such cases the upper layer
would insert the same value under this key that the was originally inserted, such as one time
cache initialization which always ends up with the same result.
- Since:
- 9.5
- Author:
- eitany
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanisEmpty()keySet()voidputIfAbsent(K key, V value) booleanbooleanintsize()toString()values()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
-
Constructor Details
-
CopyOnUpdateOnceMap
public CopyOnUpdateOnceMap()
-
-
Method Details
-
clear
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
entrySet
-
get
-
isEmpty
-
keySet
-
put
-
putAll
-
remove
-
size
-
values
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceConcurrentMap<K,V> - Specified by:
putIfAbsentin interfaceMap<K,V>
-
remove
-
replace
-
replace
-
toString
-