@GwtCompatible public abstract class ForwardingConcurrentMap<K,V> extends ForwardingMap<K,V> implements ConcurrentMap<K,V>
A concurrent map which forwards all its method calls to another concurrent map. Subclasses should override one or more methods to modify the behavior of the backing map as desired per the decorator pattern.
ForwardingMap.StandardEntrySet, ForwardingMap.StandardKeySet, ForwardingMap.StandardValues| Modifier | Constructor and Description |
|---|---|
protected |
ForwardingConcurrentMap()
Constructor for use by subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract ConcurrentMap<K,V> |
delegate()
Returns the backing delegate instance that methods are forwarded to.
|
V |
putIfAbsent(K key,
V value) |
boolean |
remove(Object key,
Object value) |
V |
replace(K key,
V value) |
boolean |
replace(K key,
V oldValue,
V newValue) |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString, valuestoStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAllprotected ForwardingConcurrentMap()
Constructor for use by subclasses.
protected abstract ConcurrentMap<K,V> delegate()
ForwardingObjectReturns the backing delegate instance that methods are forwarded to. Abstract subclasses generally override this method with an abstract method that has a more specific return type, such as ForwardingSet.delegate(). Concrete subclasses override this method to supply the instance being decorated.
delegate in class ForwardingMap<K,V>public V putIfAbsent(K key, V value)
putIfAbsent in interface ConcurrentMap<K,V>putIfAbsent in interface Map<K,V>