|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.util.SoftReferenceCache
org.apache.batik.ext.awt.image.URLImageCache
public class URLImageCache
This class manages a cache of soft references to Images that we have already loaded.
Adding an image is two fold. First you add the ParsedURL, this lets the cache know that someone is working on this ParsedURL. Then when the completed RenderedImage is ready you put it into the cache.
If someone requests a ParsedURL after it has been added but before it has been put they will be blocked until the put.
Field Summary |
---|
Fields inherited from class org.apache.batik.util.SoftReferenceCache |
---|
map |
Constructor Summary | |
---|---|
URLImageCache()
Let people create there own caches. |
Method Summary | |
---|---|
void |
clear(ParsedURL purl)
Clear the entry for ParsedURL. |
static URLImageCache |
getDefaultCache()
|
boolean |
isDone(ParsedURL purl)
Check if request(url) will return immediately with the Filter. |
boolean |
isPresent(ParsedURL purl)
Check if request(url) will return with a Filter (not putting you on the hook for it). |
void |
put(ParsedURL purl,
Filter filt)
Associate bi with purl. |
Filter |
request(ParsedURL purl)
If this returns null then you are now 'on the hook'. |
Methods inherited from class org.apache.batik.util.SoftReferenceCache |
---|
clearImpl, flush, isDoneImpl, isPresentImpl, putImpl, requestImpl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public URLImageCache()
Method Detail |
---|
public static URLImageCache getDefaultCache()
public boolean isPresent(ParsedURL purl)
public boolean isDone(ParsedURL purl)
public Filter request(ParsedURL purl)
public void clear(ParsedURL purl)
public void put(ParsedURL purl, Filter filt)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |