|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.net.CacheManager
This class manages caches.
| Constructor Summary | |
CacheManager()
|
|
CacheManager(CacheManagerSettings cacheManagerSettings)
|
|
CacheManager(ice.net.HttpSession httpSession)
Deprecated. As of 1.5.0, replaced by . |
|
| Method Summary | |
void |
addCache(Cache aCache)
Add a cache to the CacheManager. |
void |
clearAllCaches()
Clear all Caches. |
void |
clearAllExpired()
Clear only expired cache entries for every cache. |
boolean |
clearCache(String cacheName)
Clear a named cache. |
boolean |
clearExpired(String cacheName)
Clear only expired cache entries for a named cache. |
Cache |
getCache(int cachePriority)
Return a cache based on priority. |
Cache |
getCache(String cacheName)
Returns a named cache. |
InputStream |
getCachedContent(URL url,
ice.net.CacheCallback cacheCallback)
Returns an inputstream containing the requested URL, or null if the URL was not in the cache or expired. |
int |
getCacheExpirationBuffer()
Gets the cache expiration buffer in seconds of this CacheManager. |
int |
getPriority(Cache c)
Returns the current priority of the supplied cache, or -1 if no such cache exists. |
boolean |
isCacheOn()
Indicate if cache is active or not. |
boolean |
isExpired(CachedObject cachedObject)
Deprecated. As of 1.6.0, replaced by . |
boolean |
isExpired(long expires,
long recieved,
long lastModified,
long maxAge)
Deprecated. As of 1.6.0, replaced by . |
Cache |
removeCache(String cacheName)
Remove a cache from the CacheManager. |
protected void |
removeURL(URL url)
Remove an url, if it exists, from all registered caches. |
boolean |
shouldAlwaysRevalidate()
|
boolean |
shouldPersistPrivateResponses()
|
void |
status()
Prints out the status (name, maxsize and bytes used) of every cache registered in the CacheManager. |
void |
submit(byte[] bytes,
HttpURLConnection httpUrlConnection)
Deprecated. As of 1.6.0, replaced by . |
void |
submit(byte[] bytes,
HttpURLConnection httpUrlConnection)
|
void |
useCache(boolean choice)
Turn on/off caching |
void |
wasDeleted(CachedObject o,
Cache c)
Caches are to call this method for every non-expired object they discard from their internal storage. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CacheManager()
public CacheManager(CacheManagerSettings cacheManagerSettings)
cacheManagerSettings - public CacheManager(ice.net.HttpSession httpSession)
CacheManager(CacheManagerSettings).
| Method Detail |
public int getCacheExpirationBuffer()
Gets the cache expiration buffer in seconds of this
CacheManager.
public boolean shouldAlwaysRevalidate()
public boolean shouldPersistPrivateResponses()
public Cache getCache(int cachePriority)
public void addCache(Cache aCache)
public Cache removeCache(String cacheName)
public int getPriority(Cache c)
public Cache getCache(String cacheName)
public void useCache(boolean choice)
public boolean isCacheOn()
public boolean clearCache(String cacheName)
public void clearAllCaches()
public boolean clearExpired(String cacheName)
public void clearAllExpired()
protected void removeURL(URL url)
public InputStream getCachedContent(URL url,
ice.net.CacheCallback cacheCallback)
public void submit(byte[] bytes,
HttpURLConnection httpUrlConnection)
submit(byte[], HttpURLConnection).
public void submit(byte[] bytes,
HttpURLConnection httpUrlConnection)
public void status()
public boolean isExpired(CachedObject cachedObject)
CachedObject.isFresh().
public boolean isExpired(long expires,
long recieved,
long lastModified,
long maxAge)
CachedObject.isFresh().
public void wasDeleted(CachedObject o,
Cache c)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||