public class ConcurrentBoundedCache<Key,Value> extends Object implements Map<Key,Value>
Modifier and Type | Field and Description |
---|---|
protected ConcurrentHashMap<Key,SoftReference<Value>> |
_map |
protected AtomicInteger |
approximateSize |
protected static Object |
clearLock |
protected static boolean |
enabled |
protected static Object |
lazyLock |
protected static long |
upperBound |
Constructor and Description |
---|
ConcurrentBoundedCache()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<Key,Value>> |
entrySet() |
Value |
get(Object key) |
boolean |
isEmpty() |
Set<Key> |
keySet() |
Value |
put(Key key,
Value value) |
void |
putAll(Map<? extends Key,? extends Value> t) |
Value |
remove(Object key) |
int |
size() |
Collection<Value> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
protected volatile ConcurrentHashMap<Key,SoftReference<Value>> _map
protected AtomicInteger approximateSize
protected static final Object clearLock
protected static final Object lazyLock
protected static final long upperBound
protected static final boolean enabled
public ConcurrentBoundedCache()
public boolean containsKey(Object key)
containsKey
in interface Map<Key,Value>
public boolean containsValue(Object value)
containsValue
in interface Map<Key,Value>
Copyright © GigaSpaces.