bitronix.tm.utils
Class LruMap
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap
bitronix.tm.utils.LruMap
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map
public class LruMap
- extends java.util.HashMap
Last Recently Used Map with eviction listeners support implementation.
© Bitronix Software
- Author:
- lorban
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Constructor Summary |
LruMap(int maxSize)
|
Methods inherited from class java.util.HashMap |
clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, size, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
LruMap
public LruMap(int maxSize)
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Specified by:
put
in interface java.util.Map
- Overrides:
put
in class java.util.HashMap
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get
in interface java.util.Map
- Overrides:
get
in class java.util.HashMap
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
remove
in interface java.util.Map
- Overrides:
remove
in class java.util.HashMap
clear
public void clear()
- Specified by:
clear
in interface java.util.Map
- Overrides:
clear
in class java.util.HashMap
addEvictionListener
public void addEvictionListener(LruEvictionListener listener)
removeEvictionListener
public void removeEvictionListener(LruEvictionListener listener)