public class LRUMemoryCache extends AbstractDoulbeLinkedListMemoryCache
Even though there are only a few adjustments necessary to maintain the double linked list, we might want to find a more efficient memory manager for large cache regions.
The LRUMemoryCache is most efficient when the first element is selected. The smaller the region, the better the chance that this will be the case. < .04 ms per put, p3 866, 1/10 of that per get
AbstractDoulbeLinkedListMemoryCache.IteratorWrapper, AbstractDoulbeLinkedListMemoryCache.MapEntryWrapperhitCnt, list, missCnt| Constructor and Description |
|---|
LRUMemoryCache() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
adjustListForGet(MemoryElementDescriptor me)
Makes the item the first in the list.
|
protected MemoryElementDescriptor |
adjustListForUpdate(ICacheElement ce)
Puts an item to the cache.
|
addFirst, addLast, createMap, dumpCacheEntries, dumpCacheSize, dumpMap, freeElements, get, getIterator, getKeyArray, getStatistics, initialize, remove, removeAll, spoolLastElement, update, verifyCachedispose, getCacheAttributes, getCacheName, getCompositeCache, getGroupKeys, getMultiple, getQuiet, getSize, getStatus, setCacheAttributes, waterfalprotected MemoryElementDescriptor adjustListForUpdate(ICacheElement ce) throws java.io.IOException
adjustListForUpdate in class AbstractDoulbeLinkedListMemoryCachece - The cache element, or entry wrapperjava.io.IOExceptionprotected void adjustListForGet(MemoryElementDescriptor me)
adjustListForGet in class AbstractDoulbeLinkedListMemoryCacheme - Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.