K - the key classV - the value classpublic class NotedAgeOutHashMap<K,V> extends AgeOutHashMap<K,V>
AgeOutHashMap to capture the values
that are aged-out during interaction with the map, making them available
for consumption by an external party.DEFAULT_AGE_OUT_MS, MIN_AGE_OUT_MS| Constructor and Description |
|---|
NotedAgeOutHashMap()
Constructs a map with the initial age-out set to the default
number of milliseconds.
|
NotedAgeOutHashMap(long ageOutMs)
Constructs a map with the specified initial age-out value (ms).
|
NotedAgeOutHashMap(long ageOutMs,
boolean ageOutDeadwoodOnly)
Constructs a map with the specified initial age-out value (ms) and
age-out deadwood only flag.
|
| Modifier and Type | Method and Description |
|---|---|
Set<V> |
clearDeadwood()
Returns the set of aged-out values; note that this is a destructive
read operation.
|
protected void |
deadwood(Set<V> values)
Invoked when a set of values are silently removed from the map.
|
protected void |
deadwood(V value)
Invoked when a value is silently removed from the map.
|
get, getAgeOutMs, prune, put, remove, setAgeOut, size, toString, touch, touchOrPutpublic NotedAgeOutHashMap()
AgeOutHashMap.DEFAULT_AGE_OUT_MSpublic NotedAgeOutHashMap(long ageOutMs)
ageOutMs - the initial age-out valueIllegalArgumentException - if ageOutMs is less than the allowed
minimumAgeOutHashMap.MIN_AGE_OUT_MSpublic NotedAgeOutHashMap(long ageOutMs,
boolean ageOutDeadwoodOnly)
ageOutMs - the initial age-out valueageOutDeadwoodOnly - the initial age-out deadwood only valueIllegalArgumentException - if ageOutMs is less than the allowed
minimumAgeOutHashMap.MIN_AGE_OUT_MSprotected void deadwood(V value)
AgeOutHashMapThis method is provided so that subclasses may override it and do something interesting with the value just removed.
deadwood in class AgeOutHashMap<K,V>value - the value removed from the mapprotected void deadwood(Set<V> values)
AgeOutHashMapThis method is provided so that subclasses may override it and do something interesting with the values just removed.
deadwood in class AgeOutHashMap<K,V>values - the values removed from the mapCopyright © 2014. All Rights Reserved.