|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.net.MemoryCache
The basic class for caches. Implements a memorycache.
| Constructor Summary | |
MemoryCache()
Construct a default memorycache. |
|
| Method Summary | |
void |
clear()
Clears the cache of any and all entries. |
void |
clearExpired()
Check every cache entry and discard the entries which are expired. |
void |
delete(String url,
boolean propFlag)
Delete a cached entry. |
CachedObject |
get(String url)
Get the cached Object referenced by the url parameter. |
long |
getCurrentSize()
Returns the collective size of all cached objects in the cache, in bytes. |
long |
getMaxSize()
get the maximum number of bytes the cache is allowed to grow to. |
String |
getName()
Return the name of the cache. |
boolean |
has(String url)
Test if the cache has the supplied url. |
void |
setExpires(String url,
Date date)
Set the expiry date of the cached object referenced by the url. |
void |
setManager(CacheManager cmIn)
Set callback. |
void |
setMaxSize(long sizeInBytes)
Set the maximum number of bytes the cache is allowed to grow to. |
void |
submit(CachedObject cachedObject)
Submit a CachedObject to the cache. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MemoryCache()
| Method Detail |
public void setManager(CacheManager cmIn)
setManager in interface Cache
public void setExpires(String url,
Date date)
setExpires in interface Cachepublic void submit(CachedObject cachedObject)
submit in interface CacheCacheManager
public void delete(String url,
boolean propFlag)
delete in interface Cacheurl - The url describing the cache entry which is to be deleted.propFlag - Boolean value to determine if deleted entry is to be (possibly)redistributed to other cachespublic boolean has(String url)
has in interface Cachepublic long getCurrentSize()
getCurrentSize in interface Cachepublic void clear()
clear in interface Cachepublic void setMaxSize(long sizeInBytes)
setMaxSize in interface CachesizeInBytes - The size in bytes that the cache should be.public long getMaxSize()
getMaxSize in interface Cachepublic void clearExpired()
clearExpired in interface Cachepublic CachedObject get(String url)
get in interface Cacheurl - The url of the cached object (generated by URL.toString())public String getName()
getName in interface Cache
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||