|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
All caches must implement this interface.
| Method Summary | |
void |
clear()
Remove all entries in a cache. |
void |
clearExpired()
Remove all entries that has expired. |
void |
delete(String url,
boolean prop)
Remove a cache entry. |
CachedObject |
get(String url)
Retrieve a cached object from the cache. |
long |
getCurrentSize()
Returns the size of the cached objects, in bytes. |
long |
getMaxSize()
Returns the max size of the sum of the cached objects, in bytes. |
String |
getName()
Get the name of the cache. |
boolean |
has(String url)
Checks if the cache has an entry corresponding to the supplied url. |
void |
setExpires(String url,
Date expiryDate)
Set an expiry date for some entry. |
void |
setManager(CacheManager c)
Set the callback to the CacheManager |
void |
setMaxSize(long size)
Set the max size of the cache. |
void |
submit(CachedObject o)
Submit a object to be cached. |
| Method Detail |
public void setManager(CacheManager c)
public void submit(CachedObject o)
CacheManagerpublic boolean has(String url)
public CachedObject get(String url)
url - The url of the cached object (generated by URL.toString())
public void delete(String url,
boolean prop)
url - The url describing the cache entry which is to be deleted.prop - Boolean value to determine if deleted entry is to be (possibly)redistributed to other cachespublic void setMaxSize(long size)
size - The size in bytes that the cache should be.public long getMaxSize()
public long getCurrentSize()
public void clear()
public void clearExpired()
public String getName()
public void setExpires(String url,
Date expiryDate)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||