public class LRUMap<K,V>
extends java.util.LinkedHashMap<K,V>
implements java.io.Serializable
Note that serialization behavior is such that contents are NOT serialized, on assumption that all use cases are for caching where persistence does not make sense. The only thing serialized is the cache size of Map.
Modifier and Type | Field and Description |
---|---|
protected int |
_jdkSerializeMaxEntries
Ugly hack, to work through the requirement that _value is indeed final,
and that JDK serialization won't call ctor(s) if Serializable is implemented.
|
protected int |
_maxEntries |
Constructor and Description |
---|
LRUMap(int initialEntries,
int maxEntries) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
readResolve() |
protected boolean |
removeEldestEntry(java.util.Map.Entry<K,V> eldest) |
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
Copyright © 2013. All Rights Reserved.