public class LHMLRUMemoryCache<K extends Serializable,V extends Serializable> extends AbstractMemoryCache<K,V>
| Modifier and Type | Class and Description |
|---|---|
class |
LHMLRUMemoryCache.LHMSpooler
Implementation of removeEldestEntry in LinkedHashMap
|
cache, cacheAttributes, cacheName, chunkSize, elementAttributes, lock, map| Constructor and Description |
|---|
LHMLRUMemoryCache() |
| Modifier and Type | Method and Description |
|---|---|
Map<K,MemoryElementDescriptor<K,V>> |
createMap()
Returns a synchronized LHMSpooler
|
void |
dumpCacheEntries()
Dump the cache entries from first to last for debugging.
|
int |
freeElements(int numberToFree)
This can't be implemented.
|
ICacheElement<K,V> |
get(K key)
Get an item from the cache
|
Set<K> |
getKeySet()
Get an Array of the keys for all elements in the memory cache
|
ICacheElement<K,V> |
getQuiet(K key)
Get an item from the cache without affecting its last access time or position.
|
IStats |
getStatistics()
This returns semi-structured information on the memory cache, such as the size, put count,
hit count, and miss count.
|
void |
initialize(CompositeCache<K,V> hub)
For post reflection creation initialization
|
boolean |
remove(K key)
Removes an item from the cache.
|
void |
update(ICacheElement<K,V> ce)
Puts an item to the cache.
|
dispose, dumpMap, getCacheAttributes, getCacheName, getCompositeCache, getMultiple, getSize, getStatus, removeAll, setCacheAttributes, waterfalpublic void initialize(CompositeCache<K,V> hub)
initialize in interface IMemoryCache<K extends Serializable,V extends Serializable>initialize in class AbstractMemoryCache<K extends Serializable,V extends Serializable>hub - public Map<K,MemoryElementDescriptor<K,V>> createMap()
createMap in class AbstractMemoryCache<K extends Serializable,V extends Serializable>public void update(ICacheElement<K,V> ce) throws IOException
update in interface IMemoryCache<K extends Serializable,V extends Serializable>update in class AbstractMemoryCache<K extends Serializable,V extends Serializable>ce - Description of the ParameterIOExceptionpublic ICacheElement<K,V> getQuiet(K key) throws IOException
getQuiet in interface IMemoryCache<K extends Serializable,V extends Serializable>getQuiet in class AbstractMemoryCache<K extends Serializable,V extends Serializable>key - Identifies item to findIOExceptionpublic ICacheElement<K,V> get(K key) throws IOException
get in interface IMemoryCache<K extends Serializable,V extends Serializable>get in class AbstractMemoryCache<K extends Serializable,V extends Serializable>key - Identifies item to findIOExceptionpublic boolean remove(K key) throws IOException
remove in interface IMemoryCache<K extends Serializable,V extends Serializable>remove in class AbstractMemoryCache<K extends Serializable,V extends Serializable>key - IOExceptionpublic Set<K> getKeySet()
getKeySet in interface IMemoryCache<K extends Serializable,V extends Serializable>getKeySet in class AbstractMemoryCache<K extends Serializable,V extends Serializable>public IStats getStatistics()
getStatistics in interface IMemoryCache<K extends Serializable,V extends Serializable>getStatistics in class AbstractMemoryCache<K extends Serializable,V extends Serializable>public void dumpCacheEntries()
public int freeElements(int numberToFree)
throws IOException
numberToFree - IOExceptionCopyright © 2002–2015 The Apache Software Foundation. All rights reserved.