|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.SpyObject
net.spy.cache.AbstractCacheListener
net.spy.cache.AbstractCachable
public abstract class AbstractCachable
Abstract implementation of Cachable.
| Constructor Summary | |
|---|---|
AbstractCachable(Object k,
Object v)
Get an instance of AbstractCachable. |
|
| Method Summary | |
|---|---|
void |
cachedEvent(Object k)
Override cachedEvent to also send the message to the cached object if it wants it. |
int |
getAccessCount()
Get the number of times this object has been accessed. |
Object |
getCachedObject()
Get the object that was cached. |
Object |
getCacheKey()
Get the cache key. |
long |
getCacheTime()
Get the time at which this thing was cached. |
long |
getLastAccessTime()
Get the timestamp of the last access of this object. |
void |
setAccessTime(long t)
Mark a new access. |
void |
uncachedEvent(Object k)
Override uncachedEvent to also send the message to the cached object if it wants it. |
| Methods inherited from class net.spy.SpyObject |
|---|
getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.spy.cache.Cachable |
|---|
isExpired |
| Constructor Detail |
|---|
public AbstractCachable(Object k,
Object v)
| Method Detail |
|---|
public long getCacheTime()
getCacheTime in interface Cachablepublic Object getCacheKey()
getCacheKey in interface Cachablepublic Object getCachedObject()
getCachedObject in interface Cachablepublic long getLastAccessTime()
getLastAccessTime in interface Cachablepublic void setAccessTime(long t)
setAccessTime in interface Cachablet - the time at which the access occurredpublic int getAccessCount()
getAccessCount in interface Cachablepublic void cachedEvent(Object k)
cachedEvent in interface CacheListenercachedEvent in class AbstractCacheListenerk - the key with which the object was cachedpublic void uncachedEvent(Object k)
uncachedEvent in interface CacheListeneruncachedEvent in class AbstractCacheListenerk -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||