|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.anthonyeden.lib.cache.CacheEntry
A single entry in a cache. CacheEntry objects can include a specific time to live which overrides the default time to live. If the time to live is -1 then the default is used.
| Constructor Summary | |
CacheEntry(java.lang.Object object,
long insertTime)
Construct a new CacheEntry. |
|
CacheEntry(java.lang.Object object,
long insertTime,
int ttl)
Construct a new CacheEntry with the given time to live. |
|
| Method Summary | |
long |
getInsertTime()
Get the insert time. |
long |
getLastRequestTime()
Get the last request time. |
java.lang.Object |
getObject()
Get the cached object. |
int |
getTTL()
Get the time to live. |
void |
setLastRequestTime(long lastRequestTime)
Set the last request time. |
void |
setTTL(int ttl)
Set the time to live |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CacheEntry(java.lang.Object object,
long insertTime)
object - The cached objectinsertTime - The time when the object was inserted
public CacheEntry(java.lang.Object object,
long insertTime,
int ttl)
object - The cached objectinsertTime - The time when the object was insertedttl - The time to live of the entry| Method Detail |
public java.lang.Object getObject()
public long getInsertTime()
public int getTTL()
public void setTTL(int ttl)
ttl - The time to livepublic long getLastRequestTime()
public void setLastRequestTime(long lastRequestTime)
lastRequestTime - The last request time
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||