public interface CustomTtlCache<K,V> extends Cache<K,V>
Cache that permits storing entries with an individual time to live and an individual
idle time.UNLIMITED_IDLE_TIME| Modifier and Type | Method and Description |
|---|---|
V |
put(K key,
V data,
long timeToLive)
Store an entry in the cache with a specific time to live.
|
V |
put(K key,
V data,
long timeToLive,
long maxIdleTime)
Store an entry in the cache with a specific time to live and max idle time.
|
cleanUp, delete, get, getDefaultMaxIdleTime, getDefaultTtl, getMetaData, getName, getStatistics, putV put(K key, V data, long timeToLive) throws CacheException
id - A unique identifier.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.V put(K key, V data, long timeToLive, long maxIdleTime) throws CacheException
id - A unique identifier.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.Copyright © 2013 dontdrinkandroot. All Rights Reserved.