@Deprecated public class SizedConcurrentHashMap extends NullSafeConcurrentHashMap implements SizedMap, ConcurrentMap, Serializable
SizedMap that uses JDK1.5 concurrency primitivesNullSafeConcurrentHashMap.KeyFilterAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
SizedConcurrentHashMap(int size,
float load,
int concurrencyLevel)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
contains, containsKey, containsValue, elements, entrySet, get, keys, randomEntryIterator, remove, remove, removeRandom, replace, replace, valuesclear, isEmpty, keySet, putAll, sizeclone, equals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitrandomEntryIterator, removeRandompublic 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 mapConcurrentHashMappublic Object putIfAbsent(Object key, Object value)
putIfAbsent in interface ConcurrentMapputIfAbsent in class NullSafeConcurrentHashMappublic Object put(Object key, Object value)
put in interface Mapput in class NullSafeConcurrentHashMappublic int getMaxSize()
SizedMapgetMaxSize in interface SizedMappublic void setMaxSize(int max)
SizedMapsetMaxSize in interface SizedMapprotected void removeOverflow()
removeOverflow(false).protected void removeOverflow(boolean forPut)
forPut is true, then
this uses size() + 1 when computing size.public boolean isFull()
SizedMappublic void overflowRemoved(Object key, Object value)
overflowRemoved in interface SizedMapCopyright © 2006–2015 Apache Software Foundation. All rights reserved.