K - the type of keys maintained by the context associated with this contextV - the type of mapped valuespublic class ContextMap<K,V> extends ConcurrentHashMap<K,V> implements Context<K,V>
Context implementations.ConcurrentHashMap.KeySetView<K,V>AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 构造器和说明 |
|---|
ContextMap()
Creates a new, empty Context with a default initial capacity, load factor, and concurrencyLevel.
|
ContextMap(int initialCapacity)
Creates a new, empty Context with the specified initial capacity, and with default load factor and concurrencyLevel
|
ContextMap(int initialCapacity,
float loadFactor,
int concurrencyLevel)
Creates a new, empty Context with the specified initial capacity, load factor, and concurrency level.
|
ContextMap(Logger logger)
Creates a new, empty Context with a default initial capacity, load factor, and concurrencyLevel.
|
ContextMap(Map<? extends K,? extends V> t)
Creates a new Context with the same mappings as the given map.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Logger |
logger()
This method provider a
Logger utililies for user can't construct a logger
or try to log pipeline context message to one logger file. |
<T extends V> |
retrieve(K key)
That method enhances the
Map.get(Object) method that helps users
avoid the redundant code of type cast/checking when assignments are already known. |
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, valuescloneclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesprotected Logger logger
public ContextMap()
public ContextMap(Logger logger)
public ContextMap(int initialCapacity)
initialCapacity - the initial capacity.public ContextMap(int initialCapacity,
float loadFactor,
int concurrencyLevel)
initialCapacity - the initial capacity.loadFactor - the load factor threshold, used to control resizing.concurrencyLevel - the estimated number of concurrently updating threads.public <T extends V> T retrieve(K key)
Map.get(Object) method that helps users
avoid the redundant code of type cast/checking when assignments are already known.
It throws ClassCastException if types are not assignable.
retrieve 在接口中 Context<K,V>T - the target assignment typekey - the key whose associated value is to be returnednull if this map contains no mapping for the keyMap.get(Object)Copyright © 2021. All rights reserved.