|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
org.h2.util.SmallLRUCache<K,V>
K
- the keyV
- the valuepublic class SmallLRUCache<K,V>
This class implements a small LRU object cache.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Method Summary | ||
---|---|---|
static
|
newInstance(int size)
Create a new object with all elements of the given collection. |
|
protected boolean |
removeEldestEntry(java.util.Map.Entry<K,V> eldest)
|
|
void |
setMaxSize(int size)
|
Methods inherited from class java.util.LinkedHashMap |
---|
clear, containsValue, get |
Methods inherited from class java.util.HashMap |
---|
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, 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 |
---|
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Method Detail |
---|
public static <K,V> SmallLRUCache<K,V> newInstance(int size)
K
- the key typeV
- the value typesize
- the number of elements
public void setMaxSize(int size)
protected boolean removeEldestEntry(java.util.Map.Entry<K,V> eldest)
removeEldestEntry
in class java.util.LinkedHashMap<K,V>
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |