Package org.teiid.core.util
Class CopyOnWriteLinkedHashMap<K,V>
- java.lang.Object
-
- org.teiid.core.util.CopyOnWriteLinkedHashMap<K,V>
-
- Type Parameters:
K
-V
-
- All Implemented Interfaces:
Serializable
,Map<K,V>
public class CopyOnWriteLinkedHashMap<K,V> extends Object implements Map<K,V>, Serializable
Provides a mimimally concurrent (concurrent read/exclusive write)LinkedHashMap
for use in read mostly situations. Does not support modification through entry/value collections. TODO: this may not be entirely thread safe as after the clone operations there's a chance that the referenced array is replaced by rehashing.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CopyOnWriteLinkedHashMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object arg0)
Set<Map.Entry<K,V>>
entrySet()
boolean
equals(Object obj)
V
get(Object arg0)
int
hashCode()
boolean
isEmpty()
Set<K>
keySet()
V
put(K arg0, V arg1)
void
putAll(Map<? extends K,? extends V> arg0)
V
remove(Object arg0)
int
size()
String
toString()
Collection<V>
values()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<K,V>
-
containsValue
public boolean containsValue(Object arg0)
- Specified by:
containsValue
in interfaceMap<K,V>
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
-