ModeShape Distribution 3.0.0.Beta4

org.modeshape.jcr.cache
Class AllPathsCache

java.lang.Object
  extended by org.modeshape.jcr.cache.AllPathsCache

public class AllPathsCache
extends Object

A simple cache of all valid paths for a given node, where each node may have 1 or more valid paths due to additional parents.


Field Summary
protected  NodeCache cache
           
protected  PathFactory pathFactory
           
protected  NodeCache removedCache
           
 
Constructor Summary
AllPathsCache(NodeCache cache, NodeCache removedCache, ExecutionContext context)
           
 
Method Summary
protected  Set<NodeKey> getAdditionalParentKeys(CachedNode node, NodeCache cache)
           
 NodeCache getCache()
           
 Iterable<Path> getPaths(CachedNode node)
          Get all of the paths through which the specified node is accessible, including all paths based upon the node's parent (which can potentially have multiple paths) and upon the node's additional parents (which each can potentially have multiple paths).
 boolean removePath(NodeKey key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected final NodeCache cache

removedCache

protected final NodeCache removedCache

pathFactory

protected final PathFactory pathFactory
Constructor Detail

AllPathsCache

public AllPathsCache(NodeCache cache,
                     NodeCache removedCache,
                     ExecutionContext context)
Method Detail

getCache

public NodeCache getCache()

getPaths

public Iterable<Path> getPaths(CachedNode node)
Get all of the paths through which the specified node is accessible, including all paths based upon the node's parent (which can potentially have multiple paths) and upon the node's additional parents (which each can potentially have multiple paths).

Parameters:
node - the node for which the paths are to be returned; may not be null
Returns:
the paths for the node; never null but possibly empty

removePath

public boolean removePath(NodeKey key)

getAdditionalParentKeys

protected Set<NodeKey> getAdditionalParentKeys(CachedNode node,
                                               NodeCache cache)

ModeShape Distribution 3.0.0.Beta4

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