org.apache.openjpa.lib.util.concurrent
Class NullSafeConcurrentHashMap
java.lang.Object
java.util.AbstractMap<K,V>
java.util.concurrent.ConcurrentHashMap
org.apache.openjpa.lib.util.concurrent.NullSafeConcurrentHashMap
- All Implemented Interfaces:
- Serializable, ConcurrentMap, Map
- Direct Known Subclasses:
- SizedConcurrentHashMap
public class NullSafeConcurrentHashMap
- extends ConcurrentHashMap
A subclass of ConcurrentHashMap
that allows null keys and values.
In exchange, it weakens the contract of putIfAbsent(java.lang.Object, java.lang.Object)
and the other
concurrent methods added in #ConcurrentHashMap
.
- Since:
- 1.1.0
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
NullSafeConcurrentHashMap
public NullSafeConcurrentHashMap(int size,
float load,
int concurrencyLevel)
NullSafeConcurrentHashMap
public NullSafeConcurrentHashMap()
removeRandom
public Map.Entry removeRandom()
randomEntryIterator
public Iterator<Map.Entry> randomEntryIterator()
- The returned data structure should not be shared among multiple
threads.
remove
public Object remove(Object key)
- Specified by:
remove
in interface Map
- Overrides:
remove
in class ConcurrentHashMap
remove
public boolean remove(Object key,
Object value)
- Specified by:
remove
in interface ConcurrentMap
- Overrides:
remove
in class ConcurrentHashMap
replace
public boolean replace(Object key,
Object oldValue,
Object newValue)
- Specified by:
replace
in interface ConcurrentMap
- Overrides:
replace
in class ConcurrentHashMap
replace
public Object replace(Object key,
Object value)
- Specified by:
replace
in interface ConcurrentMap
- Overrides:
replace
in class ConcurrentHashMap
putIfAbsent
public Object putIfAbsent(Object key,
Object value)
- Specified by:
putIfAbsent
in interface ConcurrentMap
- Overrides:
putIfAbsent
in class ConcurrentHashMap
put
public Object put(Object key,
Object value)
- Specified by:
put
in interface Map
- Overrides:
put
in class ConcurrentHashMap
get
public Object get(Object key)
- Specified by:
get
in interface Map
- Overrides:
get
in class ConcurrentHashMap
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interface Map
- Overrides:
containsKey
in class ConcurrentHashMap
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interface Map
- Overrides:
containsValue
in class ConcurrentHashMap
contains
public boolean contains(Object value)
- Overrides:
contains
in class ConcurrentHashMap
elements
public Enumeration elements()
- Overrides:
elements
in class ConcurrentHashMap
entrySet
public Set entrySet()
- Specified by:
entrySet
in interface Map
- Overrides:
entrySet
in class ConcurrentHashMap
keys
public Enumeration keys()
- Overrides:
keys
in class ConcurrentHashMap
keySet
public Set keySet()
- Specified by:
keySet
in interface Map
- Overrides:
keySet
in class ConcurrentHashMap
values
public Collection values()
- Specified by:
values
in interface Map
- Overrides:
values
in class ConcurrentHashMap
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.This documentation is deprecated and will be removed in the next release of WebLogic Server.
Oracle Fusion Middleware Apache OpenJPA 1.1.0 API Reference
12c Release 1 (12.1.1)
Part Number E24398_01