Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## echopointng.template
Class SimpleTemplateCachingHints

    java.lang.Object
      echopointng.template.SimpleTemplateCachingHints

All Implemented Interfaces:
  TemplateCachingHints, java.io.Serializable

    public class SimpleTemplateCachingHints

extends java.lang.Object
implements TemplateCachingHints, java.io.Serializable

`SimpleTemplateCachingHints` is used to indicate to the templating rendering mechanism whether the compiled template data should be cached and for how long.

See Also:
  Serialized Form

Constructor Summary
`SimpleTemplateCachingHints()` Constructs a `SimpleTemplateCachingHints`

Method Summary
`long` | `getAccessTimeout()` If the cached template data is not accessed in this time (in milliseconds) then it can be expired from the cache.
`long` | `getLastModified()` Returns the time the content of this `TemplateDataSource` was last modified.
`long` | `getTimeToLive()` The cached template data can reside in the cache for this many milliseconds, after which it can expire.
`void` | `setAccessTimeout(long accessTimeout)` Sets the time after which a cached entry will expire if it not accessed, in milliseconds.
`void` | `setLastModified(long lastModified)` Sets the last modified time.
`void` | `setTimeToLive(long timeToLive)` Sets the time this template data can reside in the cache in milliseconds.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleTemplateCachingHints

    public SimpleTemplateCachingHints()

  Constructs a `SimpleTemplateCachingHints`

Method Detail

### getAccessTimeout

    public long getAccessTimeout()

  Description copied from interface: `TemplateCachingHints`
  If the cached template data is not accessed in this time (in milliseconds) then it can be expired from the cache.

  Specified by:
    `getAccessTimeout` in interface `TemplateCachingHints`
  Returns:
    the time after which any cached entry will expire if it not accessed, in milliseconds.
  See Also:
    `TemplateCachingHints.getAccessTimeout()`

### setAccessTimeout

    public void setAccessTimeout(long accessTimeout)

  Sets the time after which a cached entry will expire if it not accessed, in milliseconds.

  Parameters:
    `accessTimeout` - - The newValue to set.

### getLastModified

    public long getLastModified()

  Description copied from interface: `TemplateCachingHints`
  Returns the time the content of this `TemplateDataSource` was last modified.

  The return value is used to decide whether to reparse a Source or not. Reparsing is done if the value returned here differs from the value returned at the last processing time. This may not return a 'real' time, it needs just to be comparable to itself; so some sort of version counter would be perfect as well.

  Specified by:
    `getLastModified` in interface `TemplateCachingHints`
  Returns:
    long a modification time or counter
  See Also:
    `TemplateCachingHints.getLastModified()`

### setLastModified

    public void setLastModified(long lastModified)

  Sets the last modified time.

  Parameters:
    `lastModified` - - The newValue to set.

### getTimeToLive

    public long getTimeToLive()

  Description copied from interface: `TemplateCachingHints`
  The cached template data can reside in the cache for this many milliseconds, after which it can expire.

  Specified by:
    `getTimeToLive` in interface `TemplateCachingHints`
  Returns:
    the time this template data can reside in the cache in milliseconds.
  See Also:
    `TemplateCachingHints.getTimeToLive()`

### setTimeToLive

    public void setTimeToLive(long timeToLive)

  Sets the time this template data can reside in the cache in milliseconds.

  Parameters:
    `timeToLive` - - The newValue to set.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD