|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CachingStrategy
Abstract interface for a cache loading strategy. Items may be loaded and cached based on a variety of algorithms. This interface abstracts out the loading policy from the rest of the caching machinery.
Updateable| Method Summary | |
|---|---|
void |
clearCache()
Clears all the elements in the cache. |
CacheRetriever |
getCacheRetriever()
Retrieve the CacheRetriever currently being used. |
long |
getDelay()
Returns the interval between two cache updates. |
int |
getMaximumAge()
Retrieves the maximum age a cache item can be before it is evicted from the cache. |
void |
setCacheRetriever(CacheRetriever retriever)
Sets the CacheRetriever for this caching strategy. |
void |
setDefaultTemplate(java.lang.String template)
Sets the default template to use when retrieving. |
void |
setDelay(long delay)
Sets the interval between two cache updates. |
void |
setEventHandler(CacheEventAdapter handler)
Sets the object to be used for firing cache events. |
void |
setMaximumAge(int age)
Sets the maximum age a cache item can be before it is evicted from the cache. |
void |
startAutoUpdate()
Begins automatic updates of the cache. |
| Methods inherited from interface freemarker.template.cache.Updateable |
|---|
update, update, update |
| Methods inherited from interface freemarker.template.cache.Cache |
|---|
addCacheListener, getCacheListeners, getItem, getItem, listCachedFiles, removeCacheListener, stopAutoUpdate |
| Method Detail |
|---|
void setCacheRetriever(CacheRetriever retriever)
CacheRetriever for this caching strategy.
retriever - the CacheRetriever to be usedCacheRetriever getCacheRetriever()
CacheRetriever currently being used.
CacheRetrievervoid setDelay(long delay)
delay - the number of seconds between cache updateslong getDelay()
void setMaximumAge(int age)
age - the maximum age before an item is evicted from the cacheint getMaximumAge()
void clearCache()
void setEventHandler(CacheEventAdapter handler)
handler - the event handler to use for firing eventsvoid setDefaultTemplate(java.lang.String template)
template - the type of template to be used by default when retrieving
objects from the repositoryvoid startAutoUpdate()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||