Package io.undertow.util
Class CopyOnWriteMap<K,V>
java.lang.Object
io.undertow.util.CopyOnWriteMap<K,V>
- All Implemented Interfaces:
ConcurrentMap<K,
,V> Map<K,
V>
A basic copy on write map. It simply delegates to an underlying map, that is swapped out
every time the map is updated.
Note: this is not a secure map. It should not be used in situations where the map is populated
from user input.
- Author:
- Stuart Douglas
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
isEmpty()
keySet()
void
putIfAbsent
(K key, V value) boolean
removeInternal
(Object key) boolean
int
size()
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
-
Constructor Details
-
CopyOnWriteMap
public CopyOnWriteMap() -
CopyOnWriteMap
-
-
Method Details
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceConcurrentMap<K,
V> - Specified by:
putIfAbsent
in interfaceMap<K,
V>
-
remove
-
replace
-
replace
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
removeInternal
-