public class MRUMemoryCache<K,V> extends AbstractDoubleLinkedListMemoryCache<K,V>
list
Constructor and Description |
---|
MRUMemoryCache() |
Modifier and Type | Method and Description |
---|---|
protected void |
adjustListForGet(MemoryElementDescriptor<K,V> me)
Makes the item the last in the list.
|
protected MemoryElementDescriptor<K,V> |
adjustListForUpdate(ICacheElement<K,V> ce)
Adds the item to the front of the list.
|
addFirst, addLast, createMap, freeElements, get, getKeySet, getStatistics, initialize, remove, removeAll, update
dispose, dumpMap, getCacheAttributes, getCacheName, getCompositeCache, getMultiple, getQuiet, getSize, getStatus, setCacheAttributes, waterfal
public MRUMemoryCache()
protected MemoryElementDescriptor<K,V> adjustListForUpdate(ICacheElement<K,V> ce) throws IOException
It's not clear if the put operation should be different. Perhaps this should remove the oldest if full, and then put.
adjustListForUpdate
in class AbstractDoubleLinkedListMemoryCache<K,V>
ce
- IOException
protected void adjustListForGet(MemoryElementDescriptor<K,V> me)
adjustListForGet
in class AbstractDoubleLinkedListMemoryCache<K,V>
me
- Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.