|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.template.cache.BaseCachingStrategy
public abstract class BaseCachingStrategy
Base class for implementing common elements of the caching strategies included with FM-Classic.
Field Summary | |
---|---|
protected CacheEventAdapter |
eventHandler
A proxy object for firing cache events to any listening event handlers. |
protected CacheRetriever |
retriever
An object from which a caching strategy can retrieve templates. |
Constructor Summary | |
---|---|
BaseCachingStrategy()
Default constructor. |
|
BaseCachingStrategy(CacheRetriever retriever)
Creates new BaseCachingStrategy with a cache retriever. |
Method Summary | |
---|---|
void |
addCacheListener(CacheListener listener)
Registers a CacheListener for this
Cache . |
protected boolean |
connectionOk()
Determines whether our data source is still available. |
CacheListener[] |
getCacheListeners()
Returns all the CacheListener s registered
with this strategy. |
CacheRetriever |
getCacheRetriever()
Returns the current retriever. |
void |
removeCacheListener(CacheListener listener)
Unregisters a CacheListener for this
Cache . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface freemarker.template.cache.CachingStrategy |
---|
clearCache, getDefaultTemplateType, getDelay, getMaximumAge, startAutoUpdate |
Methods inherited from interface freemarker.template.cache.Updateable |
---|
update, update, update |
Methods inherited from interface freemarker.template.cache.Cache |
---|
getItem, getItem, listCachedFiles, stopAutoUpdate |
Field Detail |
---|
protected CacheEventAdapter eventHandler
protected CacheRetriever retriever
Constructor Detail |
---|
public BaseCachingStrategy()
public BaseCachingStrategy(CacheRetriever retriever)
BaseCachingStrategy
with a cache retriever.
retriever
- the retriever to use to pull items from the data storeMethod Detail |
---|
public CacheRetriever getCacheRetriever()
getCacheRetriever
in interface CachingStrategy
public void addCacheListener(CacheListener listener)
CacheListener
for this
Cache
.
addCacheListener
in interface Cache
listener
- the CacheListener
to be registered.public CacheListener[] getCacheListeners()
CacheListener
s registered
with this strategy.
getCacheListeners
in interface Cache
CacheListener
s that have been registered.public void removeCacheListener(CacheListener listener)
CacheListener
for this
Cache
.
removeCacheListener
in interface Cache
listener
- the CacheListener
to be unregistered.protected boolean connectionOk()
true
if the data source is ok, otherwise false
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |