org.stringtree.util
Class AbstractCache
java.lang.Object
org.stringtree.util.AbstractCache
- All Implemented Interfaces:
- Cached, Proxy
public abstract class AbstractCache
- extends java.lang.Object
- implements Cached
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
status
protected CacheStatus status
timestamp
protected java.util.Date timestamp
cache
protected java.lang.Object cache
AbstractCache
public AbstractCache(java.lang.Object cache)
AbstractCache
public AbstractCache()
getCachedStatus
public int getCachedStatus()
- Specified by:
getCachedStatus
in interface Cached
getObject
protected java.lang.Object getObject()
getValue
public java.lang.Object getValue()
- Specified by:
getValue
in interface Proxy
getTimestamp
public java.util.Date getTimestamp()
- Specified by:
getTimestamp
in interface Cached
mark
private void mark(int status,
long stamp)
markFull
private void markFull()
markEmpty
private void markEmpty()
markLoading
private void markLoading()
markError
private void markError()
load
public void load()
- Specified by:
load
in interface Cached
unload
public void unload()
- Specified by:
unload
in interface Cached
ensure
public void ensure()
- Specified by:
ensure
in interface Cached
reload
public void reload()
- Specified by:
reload
in interface Cached
doLoad
protected abstract boolean doLoad()
doUnload
protected abstract void doUnload()