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

## org.modeshape.graph.connector.base.cache
Class InMemoryNodeCache.PathCachePolicy

    java.lang.Object
      org.modeshape.graph.connector.base.cache.InMemoryNodeCache.PathCachePolicy

All Implemented Interfaces:
  Serializable, CachePolicy, NodeCachePolicy<Path,PathNode>

Enclosing class:
  InMemoryNodeCache<KeyType,NodeType extends Node>

    public static class InMemoryNodeCache.PathCachePolicy

extends Object
implements NodeCachePolicy<Path,PathNode>

See Also:
  Serialized Form

Constructor Summary
`InMemoryNodeCache.PathCachePolicy()`
`InMemoryNodeCache.PathCachePolicy(long timeToLiveInSeconds)`

Method Summary
`long` | `getTimeToLive()` Get the system time in milliseconds before which the node data remains valid.
`InMemoryNodeCache.PathCache` | `newCache()` Return a new cache instance that `uses this policy`.
`void` | `setTimeToLive(long timeToLiveInSeconds)`
`boolean` | `shouldCache(PathNode node)` Indicates whether the node should be cached .

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

Constructor Detail

### InMemoryNodeCache.PathCachePolicy

    public InMemoryNodeCache.PathCachePolicy()

### InMemoryNodeCache.PathCachePolicy

    public InMemoryNodeCache.PathCachePolicy(long timeToLiveInSeconds)

Method Detail

### shouldCache

    public boolean shouldCache(PathNode node)

  Description copied from interface: `NodeCachePolicy`
  Indicates whether the node should be cached .

  Specified by:
    `shouldCache` in interface `NodeCachePolicy<Path,PathNode>`
  Parameters:
    `node` - the node that may or may not be cached; may not be null
  Returns:
    true for all nodes
  See Also:
    `NodeCachePolicy.shouldCache(Node)`

### getTimeToLive

    public long getTimeToLive()

  Description copied from interface: `CachePolicy`
  Get the system time in milliseconds before which the node data remains valid.

  Specified by:
    `getTimeToLive` in interface `CachePolicy`
  Returns:
    the number of milliseconds that the cached data should be used before consulting the original source.

### setTimeToLive

    public void setTimeToLive(long timeToLiveInSeconds)

### newCache

    public InMemoryNodeCache.PathCache newCache()

  Description copied from interface: `NodeCachePolicy`
  Return a new cache instance that `uses this policy`.

  Specified by:
    `newCache` in interface `NodeCachePolicy<Path,PathNode>`
  Returns:
    the cache class

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

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.