IFdbDirectoryLayerMapper
Namespace: FoundationDB.Client · interface
Helper interface that can map keys to their corresponding directories
Methods
GetPaths
IReadOnlyDictionary<FdbPath, Slice> GetPaths()
Returns the map of all known directories
TryMapKey
bool TryMapKey(Slice key, out FdbPath path, out Slice mappedKey)
Finds the path that contains a given key in the database
key— Key in the database snapshotpath— Receives the path to the directory subspace that contains this keymappedKey— Receives the tail of the key, minus the path prefix.
Returns: true if key belongs to a known path; otherwise, false
TryMapPath
bool TryMapPath(FdbPath path, out Slice prefix)
Returns the prefix that corresponds to a given path, if it is known
path— Path to mapprefix— Receives the key prefix for this path
Returns: true if the path is known by this mapper; otherwise, false