|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.anthonyeden.lib.cache.AbstractCache
Abstract implementation of the Cache interface. Cache implementations can use this class as a base class for their implementation.
| Field Summary | |
static int |
DEFAULT_TTL
The default TTL (-1 infinate). |
protected int |
ttl
The default time to live. |
| Constructor Summary | |
AbstractCache()
|
|
| Method Summary | |
int |
getTTL()
Get the default time to live for the cache. |
protected boolean |
isExpired(CacheEntry cacheEntry)
Check to see if the given CacheEntry is expired. |
void |
loadConfiguration(Configuration configuration)
Load the Cache's configuration from the given Configuration object. |
void |
setTTL(int ttl)
Set the default time to live for the cache. |
void |
setTTL(java.lang.String ttl)
Set the default time to live of the Cache. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.anthonyeden.lib.cache.Cache |
get, put, put, remove |
| Field Detail |
public static final int DEFAULT_TTL
protected int ttl
| Constructor Detail |
public AbstractCache()
| Method Detail |
public int getTTL()
getTTL in interface Cachepublic void setTTL(int ttl)
setTTL in interface Cachettl - The default time to livepublic void setTTL(java.lang.String ttl)
AbstractCache.DEFAULT_TTL.
ttl - The default time to live as a Stringprotected boolean isExpired(CacheEntry cacheEntry)
cacheEntry - The CacheEntry
public void loadConfiguration(Configuration configuration)
throws ConfigurationException
loadConfiguration in interface Cacheconfiguration - The Configuration object
ConfigurationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||