org.jboss.cache.util.concurrent
Class SelfInitializingConcurrentHashMap<K,V>
java.lang.Object
org.jboss.cache.util.concurrent.SelfInitializingConcurrentHashMap<K,V>
- All Implemented Interfaces:
- java.util.concurrent.ConcurrentMap<K,V>, java.util.Map<K,V>
public class SelfInitializingConcurrentHashMap<K,V>
- extends java.lang.Object
- implements java.util.concurrent.ConcurrentMap<K,V>
Primarily used to hold child maps for nodes. Underlying CHM is null initially, and once threads start
writing to this map, the CHM is initialized.
- Since:
- 3.0
- Author:
- Manik Surtani (manik AT jboss DOT org)
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SelfInitializingConcurrentHashMap
public SelfInitializingConcurrentHashMap()
put
public final V put(K key,
V value)
- Specified by:
put
in interface java.util.Map<K,V>
remove
public final V remove(java.lang.Object key)
- Specified by:
remove
in interface java.util.Map<K,V>
putAll
public final void putAll(java.util.Map<? extends K,? extends V> m)
- Specified by:
putAll
in interface java.util.Map<K,V>
putIfAbsent
public final V putIfAbsent(K key,
V value)
- Specified by:
putIfAbsent
in interface java.util.concurrent.ConcurrentMap<K,V>
replace
public final boolean replace(K key,
V oldValue,
V newValue)
- Specified by:
replace
in interface java.util.concurrent.ConcurrentMap<K,V>
replace
public final V replace(K key,
V value)
- Specified by:
replace
in interface java.util.concurrent.ConcurrentMap<K,V>
remove
public final boolean remove(java.lang.Object key,
java.lang.Object value)
- Specified by:
remove
in interface java.util.concurrent.ConcurrentMap<K,V>
size
public final int size()
- Specified by:
size
in interface java.util.Map<K,V>
isEmpty
public final boolean isEmpty()
- Specified by:
isEmpty
in interface java.util.Map<K,V>
containsKey
public final boolean containsKey(java.lang.Object key)
- Specified by:
containsKey
in interface java.util.Map<K,V>
containsValue
public final boolean containsValue(java.lang.Object value)
- Specified by:
containsValue
in interface java.util.Map<K,V>
get
public final V get(java.lang.Object key)
- Specified by:
get
in interface java.util.Map<K,V>
clear
public final void clear()
- Specified by:
clear
in interface java.util.Map<K,V>
keySet
public final java.util.Set<K> keySet()
- Specified by:
keySet
in interface java.util.Map<K,V>
values
public final java.util.Collection<V> values()
- Specified by:
values
in interface java.util.Map<K,V>
entrySet
public final java.util.Set<java.util.Map.Entry<K,V>> entrySet()
- Specified by:
entrySet
in interface java.util.Map<K,V>
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interface java.util.Map<K,V>
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Specified by:
hashCode
in interface java.util.Map<K,V>
- Overrides:
hashCode
in class java.lang.Object
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.