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 voidclear()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.Set<java.util.Map.Entry<K,V>>entrySet()Vget(java.lang.Object key)booleanisEmpty()java.util.Set<K>keySet()Vput(K key, V value)voidputAll(java.util.Map<? extends K,? extends V> m)VputIfAbsent(K key, V value)Vremove(java.lang.Object key)booleanremove(java.lang.Object key, java.lang.Object value)VremoveInternal(java.lang.Object key)Vreplace(K key, V value)booleanreplace(K key, V oldValue, V newValue)intsize()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)
-
-