public class MemoryCache<K,V> extends AbstractMapBackedCustomTtlCache<K,V,SimpleMetaData>
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<K,V> |
dataMap |
UNLIMITED_IDLE_TIME| Constructor and Description |
|---|
MemoryCache(String name,
long defaultTimeToLive,
ExpungeStrategy expungeStrategy) |
MemoryCache(String name,
long defaultTimeToLive,
long defaultMaxIdleTime,
ExpungeStrategy expungeStrategy) |
| Modifier and Type | Method and Description |
|---|---|
protected V |
copyData(V data) |
protected void |
doDelete(K key,
SimpleMetaData metaData)
Performs deletion of the data belonging to the metadata.
|
protected V |
doGet(K key,
SimpleMetaData metaData)
Performs retrieval of the data belonging to the metadata.
|
protected V |
doPut(K key,
V data,
long timeToLive,
long maxIdleTime)
Performs storage of the given data and adds new metadata to the map.
|
boolean |
isCopyOnRead() |
boolean |
isCopyOnWrite() |
MemoryCache<K,V> |
setCopyOnRead(boolean copyOnRead) |
MemoryCache<K,V> |
setCopyOnWrite(boolean copyOnWrite) |
doPut, put, putcleanUp, delete, delete, expunge, get, getEntriesMetaData, getEntriesMetaDataMap, getExpungeStrategy, getMetaData, getStatistics, put, setEntriesMetaDataMap, setExpungeStrategygetCleanUpLogger, getDefaultMaxIdleTime, getDefaultTtl, getLogger, getName, setDefaultMaxIdleTime, setDefaultTtlclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcleanUp, delete, get, getDefaultMaxIdleTime, getDefaultTtl, getMetaData, getName, getStatistics, putpublic MemoryCache(String name, long defaultTimeToLive, ExpungeStrategy expungeStrategy)
public MemoryCache(String name, long defaultTimeToLive, long defaultMaxIdleTime, ExpungeStrategy expungeStrategy)
protected V doPut(K key, V data, long timeToLive, long maxIdleTime) throws CacheException
AbstractMapBackedCustomTtlCachedoPut in class AbstractMapBackedCustomTtlCache<K,V,SimpleMetaData>CacheExceptionprotected void doDelete(K key, SimpleMetaData metaData) throws CacheException
AbstractMapBackedCachedoDelete in class AbstractMapBackedCache<K,V,SimpleMetaData>CacheExceptionprotected V doGet(K key, SimpleMetaData metaData) throws CacheException
AbstractMapBackedCachedoGet in class AbstractMapBackedCache<K,V,SimpleMetaData>CacheExceptionpublic boolean isCopyOnRead()
public boolean isCopyOnWrite()
public MemoryCache<K,V> setCopyOnRead(boolean copyOnRead)
public MemoryCache<K,V> setCopyOnWrite(boolean copyOnWrite)
Copyright © 2013 dontdrinkandroot. All Rights Reserved.