org.codehaus.activemq.util
Class LRUCache
java.lang.Object
java.util.AbstractMap
java.util.HashMap
java.util.LinkedHashMap
org.codehaus.activemq.util.LRUCache
- All Implemented Interfaces:
- Cloneable, Map, Serializable
- public class LRUCache
- extends LinkedHashMap
Represnts an LRUCache of a fixed maximum size which by default will
remove items based on access order but can be used to use insertion order
- Version:
- $Revision: 1.2 $
- See Also:
- Serialized Form
Nested classes inherited from class java.util.AbstractMap |
|
Fields inherited from class java.util.HashMap |
|
Constructor Summary |
LRUCache(int maxSize)
|
LRUCache(int maxSize,
boolean accessOrder)
|
LRUCache(int initialCapacity,
float loadFactor,
boolean accessOrder,
int maxSize)
|
DEFAULT_INITIAL_CAPACITY
protected static final int DEFAULT_INITIAL_CAPACITY
- See Also:
- Constant Field Values
DEFAULT_LOAD_FACTOR
protected static final float DEFAULT_LOAD_FACTOR
- See Also:
- Constant Field Values
LRUCache
public LRUCache(int initialCapacity,
float loadFactor,
boolean accessOrder,
int maxSize)
LRUCache
public LRUCache(int maxSize)
LRUCache
public LRUCache(int maxSize,
boolean accessOrder)
removeEldestEntry
protected boolean removeEldestEntry(Map.Entry eldest)
Copyright © 2004 Protique, Ltd.. All Rights Reserved.