Class ResolvedKeySpacePath


  • public class ResolvedKeySpacePath
    extends Object
    A KeySpacePath that has been resolved into the value that will be physically stored to represent the path element in the FDB keyspace. A KeySpacePath represents a path through a logical directory tree defined by a KeySpaceDirectory. Some directories, such as a the DirectoryLayerDirectory logically represent their values in one format (such as a string) but store their version in another "resolved" format (such as a long). A ResolvedKeySpacePath represents the value for a path entry as resolved from a KeySpacePath.
    • Constructor Detail

      • ResolvedKeySpacePath

        protected ResolvedKeySpacePath​(@Nullable
                                       ResolvedKeySpacePath parent,
                                       @Nonnull
                                       KeySpacePath inner,
                                       @Nonnull
                                       PathValue value,
                                       @Nullable
                                       Tuple remainder)
        Create a resolved keyspace path.
        Parameters:
        parent - the parent resolved path
        inner - the path for which the value was resolved
        value - the resolved value
        remainder - if the path was resolved from a Tuple this is the remaining portion that extends beyond the end of the path.
    • Method Detail

      • size

        public int size()
        Get the length of the path.
        Returns:
        the length of the path
      • getParent

        @Nullable
        public ResolvedKeySpacePath getParent()
        Returns the parent path element.
        Returns:
        the parent path element or null if this is the root of the path
      • getDirectoryName

        @Nonnull
        public String getDirectoryName()
        Returns the directory name for this path element.
        Returns:
        the directory name
      • getDirectory

        @Nonnull
        public KeySpaceDirectory getDirectory()
        Returns the directory that corresponds to this path entry.
        Returns:
        returns the directory that corresponds to this path entry
      • getLogicalValue

        @Nullable
        public Object getLogicalValue()
        Returns the logical value (prior to resolving) for this path element.
        Returns:
        the logical value for this path element
      • getResolvedPathValue

        @Nonnull
        public PathValue getResolvedPathValue()
        Returns the value that will be physically stored to represent this path element along with any metadata that may be associated with it.
        Returns:
        the value that will be stored stored for the path element
      • getResolvedValue

        @Nullable
        public Object getResolvedValue()
        Returns the value that will be physically stored to represent this path element.
        Returns:
        the value that will be stored stored for the path element
      • getResolvedMetadata

        @Nullable
        public byte[] getResolvedMetadata()
        Returns any metadata that may be stored along with the resolved value for this path element. Metadata is produced from DirectoryLayerDirectory entries in which the LocatableResolver that is performing the string to long mapping is also configured to store additional metadata associated with that entry.
        Returns:
        the metadata that is stored along with the resolved value for this path element or null if there is no metadata
      • toTuple

        @Nonnull
        public Tuple toTuple()
        Converts the resolved path into a Tuple.
        Returns:
        the Tuple form of the resolved path
      • flatten

        @Nonnull
        public List<ResolvedKeySpacePath> flatten()
        Flattens the path into a list of ResolvedKeySpacePath entries, with the root of the path located at position 0.
        Returns:
        this path as a list
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object