K - the key classV - the value classpublic class VocalAgeOutHashMap<K,V> extends NotedAgeOutHashMap<K,V>
NotedAgeOutHashMap to allow listeners
to register for value removal events.DEFAULT_AGE_OUT_MS, MIN_AGE_OUT_MS| Constructor and Description |
|---|
VocalAgeOutHashMap()
Constructs a map with the initial age-out set to the default
number of milliseconds.
|
VocalAgeOutHashMap(long ageOutMs)
Constructs a map with the specified initial age-out value (ms).
|
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activates the vocal map, scheduling the map pruner to run at the
configured interval.
|
void |
addListener(VocalMapListener<V> listener)
Adds the specified listener to this map.
|
void |
deactivate()
Deactivates the vocal map, stopping the map pruner from running.
|
void |
removeListener(VocalMapListener<V> listener)
Removes the specified listener from this map.
|
clearDeadwood, deadwood, deadwoodget, getAgeOutMs, prune, put, remove, setAgeOut, size, toString, touch, touchOrPutpublic VocalAgeOutHashMap()
AgeOutHashMap.DEFAULT_AGE_OUT_MSpublic VocalAgeOutHashMap(long ageOutMs)
ageOutMs - the initial age-out valueIllegalArgumentException - if ageOutMs is less than the allowed
minimumAgeOutHashMap.MIN_AGE_OUT_MSpublic void activate()
public void deactivate()
public void addListener(VocalMapListener<V> listener)
listener - the listener to be addedpublic void removeListener(VocalMapListener<V> listener)
listener - the listener to be removedCopyright © 2014. All Rights Reserved.