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:
- java.lang.Cloneable, java.util.Map, java.io.Serializable
- public class LRUCache
- extends java.util.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.1 $
- See Also:
- Serialized Form
Nested classes inherited from class java.util.LinkedHashMap |
|
Nested classes inherited from class java.util.AbstractMap |
|
Fields inherited from class java.util.HashMap |
|
Fields inherited from class java.util.AbstractMap |
|
Constructor Summary |
LRUCache(int maxSize)
|
LRUCache(int maxSize,
boolean accessOrder)
|
LRUCache(int initialCapacity,
float loadFactor,
boolean accessOrder,
int maxSize)
|
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 |
equals, hashCode |
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(java.util.Map.Entry eldest)
Copyright © 2004 Protique, Ltd.. All Rights Reserved.