org.modeshape.jcr.cache

## Class AllPathsCache

- java.lang.Object
- - 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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected NodeCache` | `cache`
    `protected PathFactory` | `pathFactory`
    `protected NodeCache` | `removedCache`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AllPathsCache(NodeCache cache, NodeCache removedCache, ExecutionContext context)`
    `AllPathsCache(NodeCache cache, NodeCache removedCache, PathFactory pathFactory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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)

    - #### AllPathsCache

          public AllPathsCache(NodeCache cache,
                       NodeCache removedCache,
                       PathFactory pathFactory)

  - ### 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)

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