Class CopyOnUpdateMap<K,V>
java.lang.Object
com.gigaspaces.internal.utils.collections.CopyOnUpdateMap<K,V>
- All Implemented Interfaces:
ConcurrentMap<K,,V> Map<K,V>
Provides a ConcurrentMap implementation. This implementation is based on CopyOnUpdate for each
destructive operation.
- Since:
- 7.0
- Author:
- Guy Korland
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()Returns a reference to the underlying volatile map.booleanisEmpty()keySet()voidputIfAbsent(K key, V value) booleanbooleanintsize()toString()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
-
Constructor Details
-
CopyOnUpdateMap
public CopyOnUpdateMap() -
CopyOnUpdateMap
-
-
Method Details
-
getUnsafeMapReference
Returns a reference to the underlying volatile map. This is intended for rare scenarios when the underlying map type provides additional functionality. This reference should be handled with care - do not modify it!!! This would violate the copy-on-update pattern and create concurrency issues. -
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
entrySet
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceConcurrentMap<K,V> - Specified by:
putIfAbsentin interfaceMap<K,V>
-
remove
-
replace
-
replace
-
toString
-