Class KeySpaceCountTree
- java.lang.Object
-
- com.apple.foundationdb.clientlog.TupleKeyCountTree
-
- com.apple.foundationdb.record.provider.foundationdb.clientlog.KeySpaceCountTree
-
public class KeySpaceCountTree extends com.apple.foundationdb.clientlog.TupleKeyCountTree
Count keys and resolve back to key space paths.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KeySpaceCountTree.Resolved
The resolved interpretation of the node value.static class
KeySpaceCountTree.ResolvedIndexKeyspace
A resolved index keyspace.static class
KeySpaceCountTree.ResolvedKeyField
A resolved field of a record primary key or index key.static class
KeySpaceCountTree.ResolvedPath
static class
KeySpaceCountTree.ResolvedPrefixRoot
KeySpaceCountTree.ResolvedRoot
with a prefix object.static class
KeySpaceCountTree.ResolvedRecordStoreKeyspace
A resolved record store keyspace, such as records or indexes.static class
KeySpaceCountTree.ResolvedRecordTypeKeyspace
A resolved record type key prefix keyspace.static class
KeySpaceCountTree.ResolvedRoot
KeySpaceCountTree.Resolved
to aKeySpace
root.
-
Constructor Summary
Constructors Constructor Description KeySpaceCountTree(KeySpaceCountTree parent, byte[] bytes, Object object)
KeySpaceCountTree(KeySpace keySpace)
-
Method Summary
-
-
-
Method Detail
-
newChild
@Nonnull protected com.apple.foundationdb.clientlog.TupleKeyCountTree newChild(@Nonnull byte[] childBytes, @Nonnull Object object)
- Overrides:
newChild
in classcom.apple.foundationdb.clientlog.TupleKeyCountTree
-
newPrefixChild
@Nonnull protected com.apple.foundationdb.clientlog.TupleKeyCountTree newPrefixChild(@Nonnull byte[] prefixBytes, @Nonnull Object prefix)
- Overrides:
newPrefixChild
in classcom.apple.foundationdb.clientlog.TupleKeyCountTree
-
resolveVisibleChildren
public CompletableFuture<Void> resolveVisibleChildren(@Nonnull FDBRecordContext context)
-
resolve
protected CompletableFuture<Void> resolve(@Nonnull FDBRecordContext context, @Nonnull KeySpaceCountTree.Resolved resolvedParent)
-
resolve
protected CompletableFuture<KeySpaceCountTree.Resolved> resolve(@Nonnull FDBRecordContext context, @Nonnull KeySpaceCountTree.Resolved resolvedParent, @Nullable Object object)
-
resolveNonDirectory
protected CompletableFuture<KeySpaceCountTree.Resolved> resolveNonDirectory(@Nonnull FDBRecordContext context, @Nonnull KeySpaceCountTree.Resolved resolvedParent, @Nullable Object object)
Resolve something other than aKeySpaceDirectory
node.- Parameters:
context
- an open transaction to use to read from the databaseresolvedParent
- the resolved parent nodeobject
- theTuple
element for this node- Returns:
- a future that completes to a new
KeySpaceCountTree.Resolved
ornull
-
indexStoredKeys
protected List<KeyExpression> indexStoredKeys(@Nonnull Index index)
-
isRecordStoreLeaf
protected boolean isRecordStoreLeaf(@Nonnull FDBRecordContext context, @Nonnull KeySpaceCountTree.Resolved resolvedParent, @Nullable Object object)
Determine whether this leaf of theKeySpaceDirectory
tree is the root of aFDBRecordStore
. Override this if whether a leaf directory can be determined from theKeySpaceCountTree.Resolved
; for example, because they use a specificKeySpacePathWrapper
class.- Parameters:
context
- an open transaction to use to read from the databaseresolvedParent
- the resolved parent nodeobject
- theTuple
element for this node- Returns:
true
if this path stores a record store
-
getRecordStoreMetaData
protected CompletableFuture<RecordMetaData> getRecordStoreMetaData(@Nonnull FDBRecordContext context, @Nonnull KeySpaceCountTree.Resolved resolvedParent, @Nullable Object object)
Given a key space path for whichisRecordStoreLeaf(com.apple.foundationdb.record.provider.foundationdb.FDBRecordContext, com.apple.foundationdb.record.provider.foundationdb.clientlog.KeySpaceCountTree.Resolved, java.lang.Object)
istrue
, get the record store's meta-data. Override this method if the meta-data can be determined from theKeySpaceCountTree.Resolved
tree.- Parameters:
context
- an open transaction to use to read from the databaseresolvedParent
- the resolved parent nodeobject
- theTuple
element for this node- Returns:
- a future that completes to the record store's meta-data or
null
-
resolvePrimaryKeyField
protected CompletableFuture<KeySpaceCountTree.Resolved> resolvePrimaryKeyField(@Nonnull FDBRecordContext context, @Nonnull KeySpaceCountTree.Resolved resolvedParent, @Nullable Object object, @Nonnull KeyExpression fieldKey, int fieldIndex)
-
resolveIndexField
protected CompletableFuture<KeySpaceCountTree.Resolved> resolveIndexField(@Nonnull FDBRecordContext context, @Nonnull KeySpaceCountTree.Resolved resolvedParent, @Nullable Object object, @Nonnull Index index, @Nonnull KeyExpression fieldKey, int fieldIndex)
-
resolveKeyField
protected CompletableFuture<KeySpaceCountTree.Resolved> resolveKeyField(@Nonnull FDBRecordContext context, @Nonnull KeySpaceCountTree.Resolved resolvedParent, @Nullable Object object, @Nonnull KeyExpression fieldKey)
-
toString
public String toString()
- Overrides:
toString
in classcom.apple.foundationdb.clientlog.TupleKeyCountTree
-
-