Package com.j_spaces.kernel
Class SizeConcurrentHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.concurrent.ConcurrentHashMap<K,V>
com.j_spaces.kernel.SizeConcurrentHashMap<K,V>
- All Implemented Interfaces:
Serializable,ConcurrentMap<K,,V> Map<K,V>
Extends ConcurrentHashMap, keeping AtomicInteger as size counter. Notice that when using
clear() the size can be incorrect.- Author:
- Guy Korland
- See Also:
-
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
ConstructorsConstructorDescriptionSizeConcurrentHashMap(int initialCapacity) SizeConcurrentHashMap(int initialCapacity, float loadFactor, int concurrencyLevel) SizeConcurrentHashMap(Map<K, V> t) -
Method Summary
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, putAll, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, toString, valuesMethods inherited from class java.util.AbstractMap
clone
-
Constructor Details
-
SizeConcurrentHashMap
public SizeConcurrentHashMap(int initialCapacity, float loadFactor, int concurrencyLevel) -
SizeConcurrentHashMap
public SizeConcurrentHashMap(int initialCapacity) -
SizeConcurrentHashMap
public SizeConcurrentHashMap() -
SizeConcurrentHashMap
-
-
Method Details
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceConcurrentMap<K,V> - Specified by:
putIfAbsentin interfaceMap<K,V> - Overrides:
putIfAbsentin classConcurrentHashMap<K,V>
-
put
-
remove
-
remove
-
size
public final int size() -
clear
public final void clear()
-