|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.concurrent.ConcurrentHashMap
org.apache.openjpa.lib.util.concurrent.NullSafeConcurrentHashMap
org.apache.openjpa.lib.util.concurrent.SizedConcurrentHashMap
@Deprecated public class SizedConcurrentHashMap
An implementation of SizedMap
that uses JDK1.5 concurrency primitives
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.openjpa.lib.util.concurrent.NullSafeConcurrentHashMap |
---|
NullSafeConcurrentHashMap.KeyFilter |
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Constructor Summary | |
---|---|
SizedConcurrentHashMap(int size,
float load,
int concurrencyLevel)
Deprecated. |
Method Summary | |
---|---|
int |
getMaxSize()
Deprecated. The maximum number of entries, or Integer.MAX_VALUE for no limit. |
boolean |
isFull()
Deprecated. Whether the map is full. |
void |
overflowRemoved(Object key,
Object value)
Deprecated. This implementation does nothing. |
Object |
put(Object key,
Object value)
Deprecated. |
Object |
putIfAbsent(Object key,
Object value)
Deprecated. |
protected void |
removeOverflow()
Deprecated. Equivalent to removeOverflow(false) . |
protected void |
removeOverflow(boolean forPut)
Deprecated. Removes overflow. |
void |
setMaxSize(int max)
Deprecated. The maximum number of entries, or Integer.MAX_VALUE for no limit. |
Methods inherited from class org.apache.openjpa.lib.util.concurrent.NullSafeConcurrentHashMap |
---|
contains, containsKey, containsValue, elements, entrySet, get, keys, keySet, randomEntryIterator, remove, remove, removeRandom, replace, replace, values |
Methods inherited from class java.util.concurrent.ConcurrentHashMap |
---|
clear, isEmpty, putAll, size |
Methods inherited from class java.util.AbstractMap |
---|
clone, equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.openjpa.lib.util.concurrent.ConcurrentMap |
---|
randomEntryIterator, removeRandom |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, values |
Constructor Detail |
---|
public SizedConcurrentHashMap(int size, float load, int concurrencyLevel)
size
- the maximum size of this map. If additional elements are
put into the map, overflow will be removed via calls to
overflowRemoved(java.lang.Object, java.lang.Object)
.load
- the load factor for the underlying mapconcurrencyLevel
- the concurrency level for the underlying mapConcurrentHashMap
Method Detail |
---|
public Object putIfAbsent(Object key, Object value)
putIfAbsent
in interface ConcurrentMap
putIfAbsent
in class NullSafeConcurrentHashMap
public Object put(Object key, Object value)
put
in interface Map
put
in class NullSafeConcurrentHashMap
public int getMaxSize()
SizedMap
getMaxSize
in interface SizedMap
public void setMaxSize(int max)
SizedMap
setMaxSize
in interface SizedMap
protected void removeOverflow()
removeOverflow(false)
.
protected void removeOverflow(boolean forPut)
forPut
is true
, then
this uses size() + 1
when computing size.
public boolean isFull()
SizedMap
isFull
in interface SizedMap
public void overflowRemoved(Object key, Object value)
overflowRemoved
in interface SizedMap
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |