K
- key typeV
- value typepublic class ReapedMap<K,V> extends HashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
ReapedMap() |
ReapedMap(long reapAfter) |
ReapedMap(long reapAfter,
boolean accessBasedAging) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
V |
get(Object key) |
V |
put(K k,
V v) |
void |
reapable(K k)
Mark a key as being reapable, caching corresponding soft reference to corresponding value in the secondary map.
|
long |
reapableSize() |
V |
remove(Object key) |
clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, size, values
equals, hashCode, toString
public ReapedMap()
public ReapedMap(long reapAfter)
reapAfter
- entries become eligible for reaping after this duration (ms)public ReapedMap(long reapAfter, boolean accessBasedAging)
reapAfter
- entries become eligible for reaping after this duration (ms)accessBasedAging
- reset reapAfter timeout on each accesspublic void clear()
public void reapable(K k)
k
- public long reapableSize()
Copyright © 2012. All Rights Reserved.