freemarker.template.cache
Interface Updateable

All Known Subinterfaces:
CachingStrategy, TemplateCache
All Known Implementing Classes:
BaseCachingStrategy, FileTemplateCache, LoadAdHocCachingStrategy, LoadOnDemandCachingStrategy, LoDWithRefreshCachingStrategy, NullCachingStrategy, PreloadCachingStrategy

public interface Updateable

An interface for objects that need to be reminded to update themselves from time to time.

Two update styles are supported: blank and named. A blank update leaves the decision about what has to be updated to the implementation whereas a named update guarantees that only objects with a given name are updated.

Blank updates are well suited for recurring events where a set of objects has to be refreshed periodically. Named updates correspond to "push" methodology where the decision to update a specific set of objects is made on an ad hoc basis.

Version:
$Id: Updateable.java 1101 2013-04-01 04:17:32Z run2000 $
See Also:
FileTemplateCache

Method Summary
 void update()
          Asks for a "blank" update.
 void update(java.lang.String name)
          Asks for the named object to be updated.
 void update(java.lang.String name, java.lang.String type)
          Asks for the named object to be updated.
 

Method Detail

update

void update()
            throws java.lang.InterruptedException
Asks for a "blank" update. It is up to the implementation to determine what has to be updated.

Throws:
java.lang.InterruptedException - The current thread was interrupted during the update. Callers should either throw the exception back up the call stack, or set the interrupted status by using the Thread.currentThread().interrupt() method.

update

void update(java.lang.String name)
            throws java.lang.InterruptedException
Asks for the named object to be updated.

Parameters:
name - the name of the object to update
Throws:
java.lang.InterruptedException - The current thread was interrupted during the update. Callers should either throw the exception back up the call stack, or set the interrupted status by using the Thread.currentThread().interrupt() method.

update

void update(java.lang.String name,
            java.lang.String type)
            throws java.lang.InterruptedException
Asks for the named object to be updated.

Parameters:
name - the name of the object to update
type - the type of the object to update
Throws:
java.lang.InterruptedException - The current thread was interrupted during the update. Callers should either throw the exception back up the call stack, or set the interrupted status by using the Thread.currentThread().interrupt() method.