|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public void setCacheRetriever(CacheRetriever retriever)
CacheRetriever
for this caching strategy.retriever
- the CacheRetriever
to be usedpublic CacheRetriever getCacheRetriever()
CacheRetriever
currently being used.CacheRetriever
public void setDelay(long delay)
delay
- the number of seconds between cache updatespublic long getDelay()
public void setMaximumAge(int age)
age
- the maximum age before an item is evicted from the cachepublic int getMaximumAge()
public void clearCache()
public void setEventHandler(CacheEventAdapter handler)
handler
- the event handler to use for firing eventspublic void setDefaultTemplate(java.lang.String template)
template
- the type of template to be used by default when retrieving
objects from the repositorypublic void startAutoUpdate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |