|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A way to store remote documents locally. This can increase performance by eliminating TCP connection latency.
All implementations of a DiskCache should implement this interface.
Method Summary | |
void |
add(java.lang.String url)
Add this URL to the disk cache |
java.lang.String |
fetch(java.lang.String url,
java.lang.String destination)
Get the URL from the Internet and then place it in the File dest. |
DiskCacheEntry[] |
getEntries()
Get a list of all the documents within the cache... |
DiskCacheEntry |
getEntry(java.lang.String url)
Take the given remove URL and place it in the disk cache. |
DiskCacheEntry |
getEntry(java.lang.String url,
boolean force)
Get an Entry from the from the cache but force this URL to be fetched and then cached no matter what configuration options Jetspeed provides. |
DiskCacheEntry |
getEntry(java.lang.String url,
java.io.Reader is)
Get a entry based on a URL but you should already have the content. |
java.lang.String |
getRoot()
Return the root of this DiskCache. |
boolean |
isCached(java.lang.String url)
Ask if a url is in the DiskCache |
void |
refresh(java.lang.String url)
Tell the DiskCache that this URL should be refreshed. |
void |
remove(java.lang.String url)
Remove this URL from the disk cache. |
Method Detail |
public DiskCacheEntry getEntry(java.lang.String url) throws java.io.IOException
Take the given remove URL and place it in the disk cache. Additionaly operations include building a DiskCacheEntry and then returning it.
getEntry may attempt to pull down the URL if it is not in the disk cache. Most implementations may provide support for changing this behavior so that you have to explicitly call add. This is done for performance reasons so that HTTP clients don't end up triggering a URL connection to fetch the given URL.
java.io.IOException
public DiskCacheEntry getEntry(java.lang.String url, boolean force) throws java.io.IOException
Get an Entry from the from the cache but force this URL to be fetched and then cached no matter what configuration options Jetspeed provides.
java.io.IOException
getEntry( String url )
public DiskCacheEntry getEntry(java.lang.String url, java.io.Reader is) throws java.io.IOException
getEntry may attempt to pull down the URL if it is not in the disk cache. Most implementations may provide support for changing this behavior so that you have to explicitly call add. This is done for performance reasons so that HTTP clients don't end up triggering a URL connection to fetch the given URL.
java.io.IOException
public DiskCacheEntry[] getEntries()
public void add(java.lang.String url) throws java.io.IOException
java.io.IOException
public void remove(java.lang.String url) throws java.io.IOException
java.io.IOException
public java.lang.String fetch(java.lang.String url, java.lang.String destination) throws java.io.IOException
java.io.IOException
public java.lang.String getRoot()
public void refresh(java.lang.String url)
public boolean isCached(java.lang.String url)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |