org.modeshape.jcr.cache

## Interface NodeCache

- All Superinterfaces:
    CachedNodeSupplier
  All Known Subinterfaces:
    DocumentCache, SessionCache
  All Known Implementing Classes:
    AbstractSessionCache, JcrSession.SystemSessionCache, ReadOnlySessionCache, SessionCacheWrapper, TransactionalWorkspaceCache, WorkspaceCache, WritableSessionCache

      public interface NodeCache
      extends CachedNodeSupplier

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clears all changes in the cache.
    `Iterator<NodeKey>` | `getAllNodeKeys()` Get an iterator over all node keys within this cache.
    `Iterator<NodeKey>` | `getAllNodeKeysAtAndBelow(NodeKey startingKey)` Get an iterator over all keys for the supplied node and all its descendants.
    `CachedNode` | `getNode(ChildReference reference)` Get the cached representation of the node as represented by the supplied child reference.
    `NodeKey` | `getRootKey()` Get the node key for the root node.
    `NodeCache` | `unwrap()` Unwrap this instance.

    - ### Methods inherited from interface org.modeshape.jcr.cache.CachedNodeSupplier

      `getNode`

- - ### Method Detail

    - #### clear

          void clear()

      Clears all changes in the cache.

    - #### getRootKey

          NodeKey getRootKey()

      Get the node key for the root node.
      Returns:
        the root node's key; never null

    - #### getNode

          CachedNode getNode(ChildReference reference)

      Get the cached representation of the node as represented by the supplied child reference. This is a convenience method that is equivalent to calling:

           getNode(reference.getKey());

      Parameters:
        `reference` - the child node reference; may not be null
      Returns:
        the cached node to which the reference points, or null if the child reference no longer points to a valid node

    - #### getAllNodeKeys

          Iterator<NodeKey> getAllNodeKeys()

      Get an iterator over all node keys within this cache. The order of the keys is not defined.
      Returns:
        an iterator over all the cache's node keys; never null

    - #### getAllNodeKeysAtAndBelow

          Iterator<NodeKey> getAllNodeKeysAtAndBelow(NodeKey startingKey)

      Get an iterator over all keys for the supplied node and all its descendants. The order of the keys is not defined.
      Parameters:
        `startingKey` - the key for the node to start; may not be null
      Returns:
        an iterator over all the cache's node keys; never null

    - #### unwrap

          NodeCache unwrap()

      Unwrap this instance.
      Returns:
        the unwrapped SessionCache instance, or this object if there is no wrapper.

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