public class ResolvedKeySpacePath extends Object
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
.Modifier | Constructor and Description |
---|---|
protected |
ResolvedKeySpacePath(ResolvedKeySpacePath parent,
KeySpacePath inner,
PathValue value,
Tuple remainder)
Create a resolved keyspace path.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
List<ResolvedKeySpacePath> |
flatten()
Flattens the path into a list of
ResolvedKeySpacePath entries, with the root of the path
located at position 0. |
String |
getDirectoryName()
Returns the directory name for this path element.
|
Object |
getLogicalValue()
Returns the logical value (prior to resolving) for this path element.
|
ResolvedKeySpacePath |
getParent()
Returns the parent path element.
|
Tuple |
getRemainder()
If this path was created via
KeySpace.resolveFromKey(FDBRecordContext, Tuple) , this returns
any remaining portion of the input tuple that was not used to construct the path. |
byte[] |
getResolvedMetadata()
Returns any metadata that may be stored along with the resolved value for this path element.
|
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.
|
Object |
getResolvedValue()
Returns the value that will be physically stored to represent this path element.
|
int |
hashCode() |
int |
size()
Get the length of the path.
|
KeySpacePath |
toPath()
Convert the resolved path back into a
KeySpacePath . |
String |
toString() |
Subspace |
toSubspace() |
Tuple |
toTuple()
Converts the resolved path into a
Tuple . |
protected ResolvedKeySpacePath(@Nullable ResolvedKeySpacePath parent, @Nonnull KeySpacePath inner, @Nonnull PathValue value, @Nullable Tuple remainder)
parent
- the parent resolved pathinner
- the path for which the value was resolvedvalue
- the resolved valueremainder
- if the path was resolved from a Tuple
this is the remaining portion that
extends beyond the end of the path.public int size()
@Nullable public ResolvedKeySpacePath getParent()
null
if this is the root of the path@Nonnull public String getDirectoryName()
@Nullable public Object getLogicalValue()
@Nonnull public PathValue getResolvedPathValue()
@Nullable public Object getResolvedValue()
@Nullable public byte[] getResolvedMetadata()
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.null
if there is no metadata@Nonnull public Tuple toTuple()
Tuple
.Tuple
form of the resolved path@Nonnull public KeySpacePath toPath()
KeySpacePath
.KeySpacePath
for this resolved path@Nullable public Tuple getRemainder()
KeySpace.resolveFromKey(FDBRecordContext, Tuple)
, this returns
any remaining portion of the input tuple that was not used to construct the path.null
@Nonnull public List<ResolvedKeySpacePath> flatten()
ResolvedKeySpacePath
entries, with the root of the path
located at position 0.