Class LHMLRUMemoryCache<K,V> 
java.lang.Object
org.apache.commons.jcs3.engine.memory.AbstractMemoryCache<K,V>
 
org.apache.commons.jcs3.engine.memory.lru.LHMLRUMemoryCache<K,V> 
- All Implemented Interfaces:
- IMemoryCache<K,- V> 
This is a test memory manager using the jdk1.4 LinkedHashMap.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected classImplementation of removeEldestEntry in LinkedHashMap
- 
Field Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturns a synchronized LHMSpoolervoidDump the cache entries from first to last for debugging.intfreeElements(int numberToFree) This can't be implemented.This returns semi-structured information on the memory cache, such as the size, put count, hit count, and miss count.voidinitialize(CompositeCache<K, V> hub) For post reflection creation initializationprotected voidUpdate control structures after get (guarded by the lock)protected voidRemoves all cached items from the cache control structures.protected voidRemove element from control structure (guarded by the lock)voidupdate(ICacheElement<K, V> ce) Puts an item to the cache.Methods inherited from class org.apache.commons.jcs3.engine.memory.AbstractMemoryCachedispose, dumpMap, get, getCacheAttributes, getCacheName, getCompositeCache, getKeySet, getMultiple, getQuiet, getSize, remove, removeAll, removeByGroup, removeByHierarchy, setCacheAttributes, waterfal
- 
Constructor Details- 
LHMLRUMemoryCachepublic LHMLRUMemoryCache()
 
- 
- 
Method Details- 
initializeFor post reflection creation initialization- Specified by:
- initializein interface- IMemoryCache<K,- V> 
- Overrides:
- initializein class- AbstractMemoryCache<K,- V> 
- Parameters:
- hub-
 
- 
createMapReturns a synchronized LHMSpooler- Specified by:
- createMapin class- AbstractMemoryCache<K,- V> 
- Returns:
- Collections.synchronizedMap( new LHMSpooler() )
 
- 
updatePuts an item to the cache.- Specified by:
- updatein interface- IMemoryCache<K,- V> 
- Specified by:
- updatein class- AbstractMemoryCache<K,- V> 
- Parameters:
- ce- Description of the Parameter
- Throws:
- IOException
 
- 
lockedGetElementUpdate control structures after get (guarded by the lock)- Specified by:
- lockedGetElementin class- AbstractMemoryCache<K,- V> 
- Parameters:
- me- the memory element descriptor
 
- 
lockedRemoveElementRemove element from control structure (guarded by the lock)- Specified by:
- lockedRemoveElementin class- AbstractMemoryCache<K,- V> 
- Parameters:
- me- the memory element descriptor
 
- 
lockedRemoveAllRemoves all cached items from the cache control structures. (guarded by the lock)- Specified by:
- lockedRemoveAllin class- AbstractMemoryCache<K,- V> 
 
- 
getStatisticsThis returns semi-structured information on the memory cache, such as the size, put count, hit count, and miss count.- Specified by:
- getStatisticsin interface- IMemoryCache<K,- V> 
- Overrides:
- getStatisticsin class- AbstractMemoryCache<K,- V> 
- Returns:
- IStats
 
- 
dumpCacheEntriesDump the cache entries from first to last for debugging.
- 
freeElementsThis can't be implemented.- Parameters:
- numberToFree-
- Returns:
- 0
- Throws:
- IOException
 
 
-