public class LRUMap extends org.apache.commons.collections.map.LRUMap implements SizedMap
LRUMap that can change its
maximum size.org.apache.commons.collections.map.AbstractLinkedMap.EntrySetIterator, org.apache.commons.collections.map.AbstractLinkedMap.KeySetIterator, org.apache.commons.collections.map.AbstractLinkedMap.LinkEntry, org.apache.commons.collections.map.AbstractLinkedMap.LinkIterator, org.apache.commons.collections.map.AbstractLinkedMap.LinkMapIterator, org.apache.commons.collections.map.AbstractLinkedMap.ValuesIteratororg.apache.commons.collections.map.AbstractHashedMap.EntrySet, org.apache.commons.collections.map.AbstractHashedMap.HashEntry, org.apache.commons.collections.map.AbstractHashedMap.HashIterator, org.apache.commons.collections.map.AbstractHashedMap.HashMapIterator, org.apache.commons.collections.map.AbstractHashedMap.KeySet, org.apache.commons.collections.map.AbstractHashedMap.ValuesAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>data, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR, DEFAULT_THRESHOLD, entrySet, GETKEY_INVALID, GETVALUE_INVALID, keySet, loadFactor, MAXIMUM_CAPACITY, modCount, NO_NEXT_ENTRY, NO_PREVIOUS_ENTRY, NULL, REMOVE_INVALID, SETVALUE_INVALID, size, threshold, values| Constructor and Description |
|---|
LRUMap() |
LRUMap(int initCapacity) |
LRUMap(int initCapacity,
float loadFactor) |
LRUMap(Map map) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doReadObject(ObjectInputStream in) |
protected void |
doWriteObject(ObjectOutputStream out) |
int |
getMaxSize()
The maximum number of entries, or Integer.MAX_VALUE for no limit.
|
boolean |
isFull()
Whether the map is full.
|
int |
maxSize() |
void |
overflowRemoved(Object key,
Object value)
Overridable callback for when an overflow entry is automatically removed.
|
protected boolean |
removeLRU(org.apache.commons.collections.map.AbstractLinkedMap.LinkEntry entry) |
void |
setMaxSize(int max)
The maximum number of entries, or Integer.MAX_VALUE for no limit.
|
addMapping, clone, get, isScanUntilRemovable, moveToMRU, reuseMapping, updateEntryaddEntry, clear, containsValue, createEntry, createEntrySetIterator, createKeySetIterator, createValuesIterator, entryAfter, entryBefore, firstKey, getEntry, init, lastKey, mapIterator, nextKey, orderedMapIterator, previousKey, removeEntrycalculateNewCapacity, calculateThreshold, checkCapacity, containsKey, convertKey, destroyEntry, ensureCapacity, entryHashCode, entryKey, entryNext, entrySet, entryValue, equals, getEntry, hash, hashCode, hashIndex, isEmpty, isEqualKey, isEqualValue, keySet, put, putAll, remove, removeMapping, reuseEntry, size, toString, valuespublic LRUMap()
public LRUMap(int initCapacity)
public LRUMap(int initCapacity,
float loadFactor)
public LRUMap(Map map)
public int getMaxSize()
SizedMapgetMaxSize in interface SizedMappublic void setMaxSize(int max)
SizedMapsetMaxSize in interface SizedMappublic void overflowRemoved(Object key, Object value)
SizedMapoverflowRemoved in interface SizedMappublic int maxSize()
maxSize in interface org.apache.commons.collections.BoundedMapmaxSize in class org.apache.commons.collections.map.LRUMappublic boolean isFull()
SizedMapprotected boolean removeLRU(org.apache.commons.collections.map.AbstractLinkedMap.LinkEntry entry)
removeLRU in class org.apache.commons.collections.map.LRUMapprotected void doWriteObject(ObjectOutputStream out) throws IOException
doWriteObject in class org.apache.commons.collections.map.LRUMapIOExceptionprotected void doReadObject(ObjectInputStream in) throws IOException, ClassNotFoundException
doReadObject in class org.apache.commons.collections.map.LRUMapIOExceptionClassNotFoundExceptionCopyright © 2006–2017 Apache Software Foundation. All rights reserved.