public abstract class AbstractMapBackedCustomTtlCache<K,V,M extends MetaData> extends AbstractMapBackedCache<K,V,M> implements CustomTtlCache<K,V>
UNLIMITED_IDLE_TIME| Constructor and Description |
|---|
AbstractMapBackedCustomTtlCache(String name,
long defaultTimeToLive,
int maxSize,
int recycleSize)
Construct a new AbstractCustomTtlCache.
|
AbstractMapBackedCustomTtlCache(String name,
long defaultTimeToLive,
long defaultMaxIdleTime,
int maxSize,
int recycleSize)
Construct a new AbstractCustomTtlCache.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T extends V> |
doPut(K key,
T data)
Performs storage of the given data and adds new metadata to the map.
|
protected abstract <T extends V> |
doPut(K key,
T data,
long timeToLive,
long defaultMaxIdleTime)
Performs storage of the given data and adds new metadata to the map.
|
<T extends V> |
put(K key,
T data,
long timeToLive)
Store an entry in the cache with a specific time to live.
|
<T extends V> |
put(K key,
T data,
long timeToLive,
long maxIdleTime)
Store an entry in the cache with a specific time to live and max idle time.
|
<T extends V> |
putWithErrors(K key,
T data,
long timeToLive)
Store an entry in the cache with a specific time to live.
|
<T extends V> |
putWithErrors(K key,
T data,
long timeToLive,
long maxIdleTime)
Store an entry in the cache with a specific time to live and max idle time.
|
cleanUp, delete, delete, doDelete, doGet, expunge, expunge, get, getCleanUpInterval, getComparator, getEntriesMetaData, getEntry, getMaxSize, getMetaData, getRecycleSize, getStatistics, getWithErrors, put, putEntry, putWithErrors, setCleanUpInterval, setMaxSize, setRecycleSize, triggerExpungegetCleanUpLogger, getDefaultMaxIdleTime, getDefaultTtl, getLogger, getName, setDefaultMaxIdleTime, setDefaultTtlclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcleanUp, delete, expunge, get, getDefaultMaxIdleTime, getDefaultTtl, getMetaData, getName, getStatistics, getWithErrors, put, putWithErrors, setDefaultTtlpublic AbstractMapBackedCustomTtlCache(String name, long defaultTimeToLive, int maxSize, int recycleSize)
name - The name of the cache.defaultTimeToLive - The default Time to Live for Cache entries.public AbstractMapBackedCustomTtlCache(String name, long defaultTimeToLive, long defaultMaxIdleTime, int maxSize, int recycleSize)
name - The name of the cache.defaultTimeToLive - The default Time to Live for Cache entries.public <T extends V> T put(K key, T data, long timeToLive)
CustomTtlCacheCustomTtlCache.put(Object, Object, long) if you want to handle them.put in interface CustomTtlCache<K,V>data - The data to store, make sure that you don't alter the data after it has been put
to cache as (depending on the implementation) this might lead to altering the
entry in the cache. Use the returned entry instead.timeToLive - The time (in milliseconds) after which the entry expires.public <T extends V> T put(K key, T data, long timeToLive, long maxIdleTime)
CustomTtlCacheCustomTtlCache.putWithErrors(Object, Object, long) if you want to
handle them.put in interface CustomTtlCache<K,V>data - The data to store, make sure that you don't alter the data after it has been put
to cache as (depending on the implementation) this might lead to altering the
entry in the cache. Use the returned entry instead.timeToLive - The time (in milliseconds) after which the entry expires.maxIdleTime - The time (in milliseconds) that an entry may idle (not being accessed) before
being expunged.public final <T extends V> T putWithErrors(K key, T data, long timeToLive, long maxIdleTime) throws CacheException
CustomTtlCacheputWithErrors in interface CustomTtlCache<K,V>data - The data to store, make sure that you don't alter the data after it has been put
to cache as (depending on the implementation) this might lead to altering the
entry in the cache. Use the returned entry instead.timeToLive - The time (in milliseconds) after which the entry expires.maxIdleTime - The time (in milliseconds) that an entry may idle (not being accessed) before
being expunged.CacheException - Thrown if the storage fails.public final <T extends V> T putWithErrors(K key, T data, long timeToLive) throws CacheException
CustomTtlCacheputWithErrors in interface CustomTtlCache<K,V>data - The data to store, make sure that you don't alter the data after it has been put
to cache as (depending on the implementation) this might lead to altering the
entry in the cache. Use the returned entry instead.timeToLive - The time (in milliseconds) after which the entry expires.CacheException - Thrown if the storage fails.protected <T extends V> T doPut(K key, T data) throws CacheException
AbstractMapBackedCachedoPut in class AbstractMapBackedCache<K,V,M extends MetaData>CacheExceptionprotected abstract <T extends V> T doPut(K key, T data, long timeToLive, long defaultMaxIdleTime) throws CacheException
CacheExceptionCopyright © 2014 dontdrinkandroot. All rights reserved.