public class PersistantTimedLRUCache extends TimedLRUCache
lifeTime, lifeTimeRange| Constructor and Description |
|---|
PersistantTimedLRUCache(java.lang.String folder,
long defaultLifeTime)
Create a new PersistantTimedLRUCache instance.
|
PersistantTimedLRUCache(java.lang.String folder,
long defaultLifeTime,
double ratio)
Create a new PresistantTimedLRUCache instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
get(java.lang.Object key)
get an object from the cache.
|
java.lang.Object |
getOutDated(java.lang.Object key)
Returns the out dated value if there is any.
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Put a value into the cache using the specified key.
|
java.lang.Object |
remove(java.lang.Object key)
get an object from the cache.
|
java.lang.String |
toString()
Some verbose information about the cache.
|
__sget, __sput, clear, put, setLifeTime, sizepublic PersistantTimedLRUCache(java.lang.String folder,
long defaultLifeTime)
folder - the folder to write the files to.defaultLifeTime - the default life time in milli seconds.public PersistantTimedLRUCache(java.lang.String folder,
long defaultLifeTime,
double ratio)
folder - the folder to write the files to.defaultLifeTime - the default life time in milli seconds.ratio - define the ratio for the underlying cache.public java.lang.Object get(java.lang.Object key)
get in class TimedLRUCachekey - the key to perform the lookuppublic java.lang.Object remove(java.lang.Object key)
remove in class TimedLRUCachekey - the key to perform the lookuppublic java.lang.Object getOutDated(java.lang.Object key)
key - the key to lookuppublic java.lang.Object put(java.lang.Object key,
java.lang.Object value)
TimedLRUCacheput in class TimedLRUCachekey - a key object - not null!value - a value objectpublic java.lang.String toString()
TimedLRUCachetoString in class TimedLRUCache