Class DocumentNodeState

  • All Implemented Interfaces:
    org.apache.jackrabbit.oak.cache.CacheValue, org.apache.jackrabbit.oak.spi.state.NodeState

    public class DocumentNodeState
    extends AbstractDocumentNodeState
    implements org.apache.jackrabbit.oak.cache.CacheValue
    A NodeState implementation for the DocumentNodeStore.
    • Method Detail

      • withRootRevision

        public DocumentNodeState withRootRevision​(@NotNull
                                                  @NotNull RevisionVector root,
                                                  boolean externalChange)
        Creates a copy of this DocumentNodeState with the rootRevision set to the given root revision. This method returns this instance if the given root revision is the same as the one in this instance and the fromExternalChange flags are equal.
        Specified by:
        withRootRevision in class AbstractDocumentNodeState
        Parameters:
        root - the root revision for the copy of this node state.
        externalChange - if the fromExternalChange flag must be set on the returned node state.
        Returns:
        a copy of this node state with the given root revision and external change flag.
      • isFromExternalChange

        public boolean isFromExternalChange()
        Specified by:
        isFromExternalChange in class AbstractDocumentNodeState
        Returns:
        true if this node state was created as a result of an external change; false otherwise.
      • getRootRevision

        @NotNull
        public @NotNull RevisionVector getRootRevision()
        Returns the root revision for this node state. This is the root revision passed from the parent node state. This revision therefore reflects the revision of the root node state where the traversal down the tree started.
        Specified by:
        getRootRevision in class AbstractDocumentNodeState
        Returns:
        the revision of the root node state.
      • exists

        public boolean exists()
        Specified by:
        exists in interface org.apache.jackrabbit.oak.spi.state.NodeState
      • getProperty

        public org.apache.jackrabbit.oak.api.PropertyState getProperty​(@NotNull
                                                                       @NotNull String name)
        Specified by:
        getProperty in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        getProperty in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • hasProperty

        public boolean hasProperty​(@NotNull
                                   @NotNull String name)
        Specified by:
        hasProperty in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        hasProperty in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • getProperties

        @NotNull
        public @NotNull Iterable<? extends org.apache.jackrabbit.oak.api.PropertyState> getProperties()
        Specified by:
        getProperties in interface org.apache.jackrabbit.oak.spi.state.NodeState
      • hasChildNode

        public boolean hasChildNode​(@NotNull
                                    @NotNull String name)
        Specified by:
        hasChildNode in interface org.apache.jackrabbit.oak.spi.state.NodeState
      • getChildNode

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.spi.state.NodeState getChildNode​(@NotNull
                                                                                   @NotNull String name)
        Specified by:
        getChildNode in interface org.apache.jackrabbit.oak.spi.state.NodeState
      • getChildNodeCount

        public long getChildNodeCount​(long max)
        Specified by:
        getChildNodeCount in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        getChildNodeCount in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • getPropertyCount

        public long getPropertyCount()
        Specified by:
        getPropertyCount in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        getPropertyCount in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • getChildNodeEntries

        @NotNull
        public @NotNull Iterable<? extends org.apache.jackrabbit.oak.spi.state.ChildNodeEntry> getChildNodeEntries()
        Specified by:
        getChildNodeEntries in interface org.apache.jackrabbit.oak.spi.state.NodeState
      • builder

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.spi.state.NodeBuilder builder()
        Specified by:
        builder in interface org.apache.jackrabbit.oak.spi.state.NodeState
      • getBundledChildNodeNames

        public Set<String> getBundledChildNodeNames()
      • hasOnlyBundledChildren

        public boolean hasOnlyBundledChildren()
      • toString

        public String toString()
        Overrides:
        toString in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • getMemory

        public int getMemory()
        Specified by:
        getMemory in interface org.apache.jackrabbit.oak.cache.CacheValue
      • getAllBundledProperties

        public Map<String,​String> getAllBundledProperties()
        Returns all properties, including bundled, as Json serialized value.
        Returns:
        all properties, including bundled.