K - V - public interface HeapCacheBackEnd<K,V>
CHM like),
is to evict when required.ConcurrentHashMap| Modifier and Type | Interface and Description |
|---|---|
static interface |
HeapCacheBackEnd.EvictionCallback<K,V>
An eviction callback
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear(boolean notify)
Basically
CHM.clear() |
Set<Map.Entry<K,V>> |
entrySet()
Deprecated.
|
V |
get(K key)
Access a key,
basically
CHM.get() |
Policy |
getPolicy()
Deprecated.
|
boolean |
hasSpace()
Return
true if this tier has enough space for more entries. |
V |
putIfAbsent(K key,
V value)
Basically
ConcurrentMap.putIfAbsent(Object, Object) CHM.putIfAbsent(Object, Object)}, but
will evict if required (on successful put) |
void |
recalculateSize(K key)
Deprecated.
|
void |
registerEvictionCallback(HeapCacheBackEnd.EvictionCallback<K,V> callback)
Let's you register a single callback for evictions
|
V |
remove(K key)
Basically
CHM.remove(Object) |
boolean |
remove(K key,
V value)
Basically
ConcurrentMap.remove(Object, Object) CHM.remove(Object, Object)} |
boolean |
replace(K key,
V oldValue,
V newValue)
Basically
CHM.remove(Object, Object, Object) |
void |
setPolicy(Policy policy)
Deprecated.
|
int |
size()
Deprecated.
|
boolean hasSpace()
true if this tier has enough space for more entries.true if there is space for more entries.V get(K key)
CHM.get()key - the key whose associated value is to be returnednull if this map contains no mapping for the keyV putIfAbsent(K key, V value)
ConcurrentMap.putIfAbsent(Object, Object) CHM.putIfAbsent(Object, Object)}, but
will evict if required (on successful put)key - key with which the specified value is to be associatedvalue - value to be associated with the specified keyboolean remove(K key, V value)
ConcurrentMap.remove(Object, Object) CHM.remove(Object, Object)}key - key with which the specified value is associatedvalue - value expected to be associated with the specified keyboolean replace(K key, V oldValue, V newValue)
CHM.remove(Object, Object, Object)key - key with which the specified value is associatedoldValue - value expected to be associated with the specified keynewValue - value to be associated with the specified keyV remove(K key)
CHM.remove(Object)key - key whose mapping is to be removed from the mapvoid clear(boolean notify)
CHM.clear()notify - whether to notify listeners or not@Deprecated int size()
@Deprecated Set<Map.Entry<K,V>> entrySet()
void registerEvictionCallback(HeapCacheBackEnd.EvictionCallback<K,V> callback)
callback - the thing to call back on@Deprecated void recalculateSize(K key)
key - @Deprecated Policy getPolicy()
@Deprecated void setPolicy(Policy policy)
policy - the policy to useCopyright 2001-2021, Terracotta, Inc.