freemarker.template
Interface TemplateCache

All Known Implementing Classes:
FileTemplateCache

public interface TemplateCache

An interface for self-updating caches of compiled Templates.

See Also:
FileTemplateCache

Method Summary
 void addCacheListener(CacheListener listener)
          Registers a CacheListener for this TemplateCache.
 Template getTemplate(java.lang.String name)
          Gets a template from the cache.
 java.util.Iterator listCachedFiles()
          Returns an iterator over a list of CacheElement instances
 void removeCacheListener(CacheListener listener)
          Unregisters a CacheListener for this TemplateCache.
 void startAutoUpdate()
          Deprecated.  
 void stopAutoUpdate()
          Deprecated.  
 

Method Detail

addCacheListener

public void addCacheListener(CacheListener listener)
Registers a CacheListener for this TemplateCache.
Parameters:
CacheListener - the CacheListener to be registered.
See Also:
CacheListener

removeCacheListener

public void removeCacheListener(CacheListener listener)
Unregisters a CacheListener for this TemplateCache.
Parameters:
CacheListener - the CacheListener to be unregistered.
See Also:
CacheListener

getTemplate

public Template getTemplate(java.lang.String name)
Gets a template from the cache.
Parameters:
name - a string uniquely identifying the template.
Returns:
the template corresponding to the name, or null if not found.

startAutoUpdate

public void startAutoUpdate()
Deprecated.  

Note: startAutoUpdate() is deprecated. An implementation will automatically call startAutoUpdate() or its equivalent internally as determined by the caching policy

Begins automatic updates of the cache.


stopAutoUpdate

public void stopAutoUpdate()
Deprecated.  

Note: startAutoUpdate() is deprecated. An implementation will automatically call startAutoUpdate() or its equivalent internally as determined by the caching policy

Stops automatically updating the cache.


listCachedFiles

public java.util.Iterator listCachedFiles()
Returns an iterator over a list of CacheElement instances
Returns:
the iterator over a list of CacheElement instances that correspond to templates in the cache