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
Interface NodeCachePolicy<KeyType,NodeType extends Node>

Type Parameters:
  `KeyType` - the type of the unique identifier for the nodes that are to be cached
  `NodeType` - the type of nodes that are to be cached

All Superinterfaces:
  CachePolicy, Serializable

All Known Implementing Classes:
  InMemoryNodeCache.MapCachePolicy, InMemoryNodeCache.PathCachePolicy, NoCachePolicy

    public interface NodeCachePolicy<KeyType,NodeType extends Node>

extends CachePolicy

Cache policy implementation for use with `workspace caches`.

Method Summary
`
`<CacheType extends NodeCache<KeyType,NodeType>> CacheType`
` | `newCache()` Return a new cache instance that `uses this policy`.
`boolean` | `shouldCache(NodeType node)` Indicates whether the node should be cached .

Methods inherited from interface org.modeshape.graph.cache.CachePolicy
`getTimeToLive`

Method Detail

### shouldCache

    boolean shouldCache(NodeType node)

  Indicates whether the node should be cached .

  Parameters:
    `node` - the node that may or may not be cached; may not be null
  Returns:
    true if the node should be cached and false if it should not be cached

### newCache

    <CacheType extends NodeCache<KeyType,NodeType>> CacheType newCache()

  Return a new cache instance that `uses this policy`.

  Type Parameters:
    `CacheType` - the type of cache being returned
  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.