Package io.undertow.util
Class CopyOnWriteMap<K,V>
- java.lang.Object
-
- io.undertow.util.CopyOnWriteMap<K,V>
-
- All Implemented Interfaces:
java.util.concurrent.ConcurrentMap<K,V>
,java.util.Map<K,V>
public class CopyOnWriteMap<K,V> extends java.lang.Object implements java.util.concurrent.ConcurrentMap<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
-
-
Constructor Summary
Constructors Constructor Description CopyOnWriteMap()
CopyOnWriteMap(java.util.Map<K,V> existing)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
V
get(java.lang.Object key)
boolean
isEmpty()
java.util.Set<K>
keySet()
V
put(K key, V value)
void
putAll(java.util.Map<? extends K,? extends V> m)
V
putIfAbsent(K key, V value)
V
remove(java.lang.Object key)
boolean
remove(java.lang.Object key, java.lang.Object value)
V
removeInternal(java.lang.Object key)
V
replace(K key, V value)
boolean
replace(K key, V oldValue, V newValue)
int
size()
java.util.Collection<V>
values()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
remove
public boolean remove(java.lang.Object key, java.lang.Object value)
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
values
public java.util.Collection<V> values()
-
removeInternal
public V removeInternal(java.lang.Object key)
-
-