Package org.apache.ignite.internal.util
Class GridSynchronizedMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.concurrent.ConcurrentHashMap<K,V>
-
- org.apache.ignite.internal.util.GridSynchronizedMap<K,V>
-
- All Implemented Interfaces:
Externalizable,Serializable,ConcurrentMap<K,V>,Map<K,V>
public class GridSynchronizedMap<K,V> extends ConcurrentHashMap<K,V> implements Externalizable
Synchronized map for cache values that is safe to update in-place. Main reason for this map is to provide snapshot-guarantee for serialization and keep concurrent iterators.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap
ConcurrentHashMap.KeySetView<K extends Object,V extends Object>
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description GridSynchronizedMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Vput(K key, V val)voidputAll(Map<? extends K,? extends V> m)VputIfAbsent(K key, V val)voidreadExternal(ObjectInput in)Vremove(Object key)booleanremove(Object key, Object val)Vreplace(K key, V val)booleanreplace(K key, V oldVal, V newVal)voidwriteExternal(ObjectOutput out)-
Methods inherited from class java.util.concurrent.ConcurrentHashMap
compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
-
Methods inherited from class java.util.AbstractMap
clone
-
-
-
-
Method Detail
-
putIfAbsent
public V putIfAbsent(K key, V val)
- Specified by:
putIfAbsentin interfaceConcurrentMap<K,V>- Specified by:
putIfAbsentin interfaceMap<K,V>- Overrides:
putIfAbsentin classConcurrentHashMap<K,V>
-
clear
public void clear()
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-