org.richfaces.util
Class LRUMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
org.richfaces.util.LRUMap<K,V>
- All Implemented Interfaces:
- Serializable, Cloneable, Map<K,V>
public class LRUMap<K,V>
- extends LinkedHashMap<K,V>
- implements Serializable
Last Recent Used Map cache. See LinkedHashMap
for details.
- Author:
- asmirnov
- See Also:
- Serialized Form
Constructor Summary |
LRUMap()
Default capacity constructor |
LRUMap(int capacity)
|
Methods inherited from interface java.util.Map |
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
LRUMap
public LRUMap()
- Default capacity constructor
LRUMap
public LRUMap(int capacity)
- Parameters:
capacity
- - maximal cache capacity.
removeEldestEntry
protected boolean removeEldestEntry(Map.Entry<K,V> entry)
- Overrides:
removeEldestEntry
in class LinkedHashMap<K,V>
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.