Package org.jboss.logmanager
Class CopyOnWriteMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- org.jboss.logmanager.CopyOnWriteMap<K,V>
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.util.concurrent.ConcurrentMap<K,V>
,java.util.Map<K,V>
final class CopyOnWriteMap<K,V> extends java.util.AbstractMap<K,V> implements java.util.concurrent.ConcurrentMap<K,V>, java.lang.Cloneable
-
-
Field Summary
Fields Modifier and Type Field Description private static FastCopyHashMap
EMPTY
private FastCopyHashMap<K,V>
map
private static java.util.concurrent.atomic.AtomicReferenceFieldUpdater<CopyOnWriteMap,FastCopyHashMap>
mapUpdater
-
Constructor Summary
Constructors Constructor Description CopyOnWriteMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
CopyOnWriteMap<K,V>
clone()
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)
java.util.Set<K>
keySet()
V
put(K key, V value)
V
putIfAbsent(K key, V value)
V
remove(java.lang.Object key)
boolean
remove(java.lang.Object key, java.lang.Object value)
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
finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
EMPTY
private static final FastCopyHashMap EMPTY
-
map
private volatile FastCopyHashMap<K,V> map
-
mapUpdater
private static final java.util.concurrent.atomic.AtomicReferenceFieldUpdater<CopyOnWriteMap,FastCopyHashMap> mapUpdater
-
-
Method Detail
-
get
public V get(java.lang.Object key)
-
containsKey
public boolean containsKey(java.lang.Object key)
-
size
public int size()
-
containsValue
public boolean containsValue(java.lang.Object value)
-
clear
public void clear()
-
remove
public V remove(java.lang.Object key)
-
clone
public CopyOnWriteMap<K,V> clone()
-
remove
public boolean remove(java.lang.Object key, java.lang.Object value)
-
keySet
public java.util.Set<K> keySet()
-
values
public java.util.Collection<V> values()
-
-