|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.util.SoftReferenceCache
This class manages a cache of soft references to objects that may
take some time to load or create, such as images loaded from the
network.
Adding an object is two fold:
+ First you add the key, this lets the cache know that someone is
working on that key.
+ Then when the completed object is ready you put it into the cache.
If someone requests a key after it has been added but before it has been put they will be blocked until the put.
Constructor Summary | |
protected |
SoftReferenceCache()
Let people create there own caches. |
Method Summary | |
protected void |
clearImpl(java.lang.Object key)
Clear the entry for key. |
void |
flush()
Let people flush the cache (remove any cached data). |
protected boolean |
isDoneImpl(java.lang.Object key)
Check if request(key) will return immediately with the Object. |
protected boolean |
isPresentImpl(java.lang.Object key)
Check if request(key) will return with an Object (not putting you on the hook for it). |
protected void |
putImpl(java.lang.Object key,
java.lang.Object object)
Associate object with key. |
protected java.lang.Object |
requestImpl(java.lang.Object key)
If this returns null then you are now 'on the hook'. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected SoftReferenceCache()
Method Detail |
public void flush()
protected final boolean isPresentImpl(java.lang.Object key)
protected final boolean isDoneImpl(java.lang.Object key)
protected final java.lang.Object requestImpl(java.lang.Object key)
protected final void clearImpl(java.lang.Object key)
protected final void putImpl(java.lang.Object key, java.lang.Object object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |