K - the type of keys maintained by this mapV - the type of mapped values@Beta public final class MutableTrieMap<K,V> extends TrieMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
ImmutableTrieMap<K,V> |
immutableSnapshot()
Returns a read-only snapshot of this TrieMap.
|
MutableTrieMap<K,V> |
mutableSnapshot()
Returns a snapshot of this TrieMap.
|
V |
put(K key,
V value) |
V |
putIfAbsent(K key,
V value) |
V |
remove(Object key) |
boolean |
remove(Object key,
Object value) |
V |
replace(K key,
V value) |
boolean |
replace(K key,
V oldValue,
V newValue) |
int |
size() |
containsKey, containsValue, create, entrySet, get, keySetclone, equals, hashCode, isEmpty, putAll, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAllpublic void clear()
public V putIfAbsent(K key, V value)
putIfAbsent in interface ConcurrentMap<K,V>putIfAbsent in interface Map<K,V>putIfAbsent in class TrieMap<K,V>public int size()
public ImmutableTrieMap<K,V> immutableSnapshot()
TrieMapThe snapshot is lazily updated - the first time some branch of this TrieMap are accessed, it is rewritten. The work of creating the snapshot is thus distributed across subsequent updates and accesses on this TrieMap by all threads. Note that the snapshot itself is never rewritten unlike when calling the `snapshot` method, but the obtained snapshot cannot be modified.
This method is used by other methods such as `size` and `iterator`.
immutableSnapshot in class TrieMap<K,V>public MutableTrieMap<K,V> mutableSnapshot()
TrieMapThe snapshot is lazily updated - the first time some branch in the snapshot or this TrieMap are accessed, they are rewritten. This means that the work of rebuilding both the snapshot and this TrieMap is distributed across all the threads doing updates or accesses subsequent to the snapshot creation.
mutableSnapshot in class TrieMap<K,V>Copyright © 2018 OpenDaylight. All rights reserved.