|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.net.FileCache
A basic class for caches, implements a Filecache. The default directory to place files in is './cache'
| Constructor Summary | |
FileCache(String pathIn)
Construct an empty FileCache which uses the path specified. |
|
| Method Summary | |
void |
clear()
Remove all cached entries in the cache. |
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 approximate number of bytes of cached object in the cache. |
String |
getDirectory()
get directory in which the cached files should be put. |
long |
getMaxSize()
Get the maximum number of bytes the cache is allowed to grow to. |
String |
getName()
Returns the name of the cache. |
boolean |
has(String url)
Test if the cache has the supplied url. |
void |
setDirectory(String pathIn)
Set directory in which the cached files should be put. |
void |
setExpires(String url,
Date date)
Set the expiry date of the cached object referenced by the url. |
void |
setManager(CacheManager cmIn)
Set the manager 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 FileCache(String pathIn)
throws ICEException
| Method Detail |
public void setManager(CacheManager cmIn)
setManager in interface CachecmIn - instance of the CacheManager callbackpublic void submit(CachedObject cachedObject)
submit in interface CachecachedObject - the instance of a cachedObject to cacheCacheManagerpublic boolean has(String url)
has in interface Cacheurl - The URL to test
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 caches
public void setDirectory(String pathIn)
throws ICEException
ICEExceptionpublic String getDirectory()
public 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 Cache
public void setExpires(String url,
Date date)
setExpires in interface Cachepublic void clearExpired()
clearExpired in interface Cachepublic CachedObject get(String url)
get in interface Cacheurl - The URL of the item to retrieve
public String getName()
getName in interface Cache
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||