Package org.apache.uima.util
Class ConcurrentHashMapWithProducer<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.concurrent.ConcurrentHashMap<K,V>
org.apache.uima.util.ConcurrentHashMapWithProducer<K,V>
- All Implemented Interfaces:
Serializable
,ConcurrentMap<K,
,V> Map<K,
V>
A concurrent map supporting a value-creating get.
There's a small window where the value producing function could be called multiple times
on different threads, but the first one will be used and the others thrown away.
- 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> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConcurrentHashMapWithProducer
(int initialCapacity) ConcurrentHashMapWithProducer
(int initialCapacity, float loadFactor) ConcurrentHashMapWithProducer
(int initialCapacity, float loadFactor, int concurrencyLevel) ConcurrentHashMapWithProducer
(Map<? extends K, ? extends V> m) -
Method Summary
Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, 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, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
Methods inherited from class java.util.AbstractMap
clone
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
ConcurrentHashMapWithProducer
public ConcurrentHashMapWithProducer() -
ConcurrentHashMapWithProducer
public ConcurrentHashMapWithProducer(int initialCapacity, float loadFactor, int concurrencyLevel) -
ConcurrentHashMapWithProducer
public ConcurrentHashMapWithProducer(int initialCapacity, float loadFactor) -
ConcurrentHashMapWithProducer
public ConcurrentHashMapWithProducer(int initialCapacity) -
ConcurrentHashMapWithProducer
-
-
Method Details
-
get
- Throws:
Exception
-