freemarker.template
Enum FileTemplateCache.Strategy

java.lang.Object
  extended by java.lang.Enum<FileTemplateCache.Strategy>
      extended by freemarker.template.FileTemplateCache.Strategy
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FileTemplateCache.Strategy>
Enclosing class:
FileTemplateCache

public static enum FileTemplateCache.Strategy
extends java.lang.Enum<FileTemplateCache.Strategy>

Enumeration of caching strategies available to this cache.


Enum Constant Summary
LOAD_AD_HOC
          Used with FileTemplateCache.setLoadingPolicy(freemarker.template.FileTemplateCache.Strategy) to indicate that templates are preloaded but there is no automatic updating of them.
LOAD_ON_DEMAND
          Used with FileTemplateCache.setLoadingPolicy(freemarker.template.FileTemplateCache.Strategy) to indicate that templates should be loaded as they are requested.
LOAD_ON_DEMAND_WITH_REFRESH
          Used with FileTemplateCache.setLoadingPolicy(freemarker.template.FileTemplateCache.Strategy) to indicate that templates should be loaded as they are requested.
NULL_CACHE
          Used with FileTemplateCache.setLoadingPolicy(freemarker.template.FileTemplateCache.Strategy) to indicate that no files are cached.
PRELOAD
          Used with FileTemplateCache.setLoadingPolicy(freemarker.template.FileTemplateCache.Strategy) to indicate that templates should be preloaded.
 
Method Summary
static FileTemplateCache.Strategy valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FileTemplateCache.Strategy[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LOAD_ON_DEMAND

public static final FileTemplateCache.Strategy LOAD_ON_DEMAND
Used with FileTemplateCache.setLoadingPolicy(freemarker.template.FileTemplateCache.Strategy) to indicate that templates should be loaded as they are requested.


PRELOAD

public static final FileTemplateCache.Strategy PRELOAD
Used with FileTemplateCache.setLoadingPolicy(freemarker.template.FileTemplateCache.Strategy) to indicate that templates should be preloaded.


LOAD_AD_HOC

public static final FileTemplateCache.Strategy LOAD_AD_HOC
Used with FileTemplateCache.setLoadingPolicy(freemarker.template.FileTemplateCache.Strategy) to indicate that templates are preloaded but there is no automatic updating of them. Instead, only named templates are updated when the cache is requested to do so.


NULL_CACHE

public static final FileTemplateCache.Strategy NULL_CACHE
Used with FileTemplateCache.setLoadingPolicy(freemarker.template.FileTemplateCache.Strategy) to indicate that no files are cached.


LOAD_ON_DEMAND_WITH_REFRESH

public static final FileTemplateCache.Strategy LOAD_ON_DEMAND_WITH_REFRESH
Used with FileTemplateCache.setLoadingPolicy(freemarker.template.FileTemplateCache.Strategy) to indicate that templates should be loaded as they are requested. Once loaded, they are periodically refreshed as per the PRELOAD policy, rather than checked at each request.

Method Detail

values

public static FileTemplateCache.Strategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FileTemplateCache.Strategy c : FileTemplateCache.Strategy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FileTemplateCache.Strategy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null