Class LRUMemoryCache<K,V> 
java.lang.Object
org.apache.commons.jcs3.engine.memory.AbstractMemoryCache<K,V>
 
org.apache.commons.jcs3.engine.memory.AbstractDoubleLinkedListMemoryCache<K,V>
 
org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache<K,V> 
- All Implemented Interfaces:
- IMemoryCache<K,- V> 
A fast reference management system. The least recently used items move to the end of the list and
 get spooled to disk if the cache hub is configured to use a disk cache. Most of the cache
 bottlenecks are in IO. There are no io bottlenecks here, it's all about processing power.
 
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
- 
Field SummaryFields inherited from class org.apache.commons.jcs3.engine.memory.AbstractDoubleLinkedListMemoryCachelist
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidMakes the item the first in the list.protected MemoryElementDescriptor<K,V> Puts an item to the cache.Methods inherited from class org.apache.commons.jcs3.engine.memory.AbstractDoubleLinkedListMemoryCacheaddFirst, addLast, createMap, freeElements, get, getStatistics, initialize, lockedGetElement, lockedRemoveAll, lockedRemoveElement, updateMethods inherited from class org.apache.commons.jcs3.engine.memory.AbstractMemoryCachedispose, dumpMap, getCacheAttributes, getCacheName, getCompositeCache, getKeySet, getMultiple, getQuiet, getSize, remove, removeAll, removeByGroup, removeByHierarchy, setCacheAttributes, waterfal
- 
Constructor Details- 
LRUMemoryCachepublic LRUMemoryCache()
 
- 
- 
Method Details- 
adjustListForUpdateprotected MemoryElementDescriptor<K,V> adjustListForUpdate(ICacheElement<K, V> ce) throws IOExceptionPuts an item to the cache. Removes any pre-existing entries of the same key from the linked list and adds this one first.- Specified by:
- adjustListForUpdatein class- AbstractDoubleLinkedListMemoryCache<K,- V> 
- Parameters:
- ce- The cache element, or entry wrapper
- Returns:
- MemoryElementDescriptor the new node
- Throws:
- IOException
 
- 
adjustListForGetMakes the item the first in the list.- Specified by:
- adjustListForGetin class- AbstractDoubleLinkedListMemoryCache<K,- V> 
- Parameters:
- me-
 
 
-