ISubspaceLocation

Namespace: FoundationDB.Client · interface

Implements: IEquatable<ISubspaceLocation>

Represents the path to a specific subspace in the database

Remarks

A path can be resolved into the actual implementation that will be valid within the context of a transaction.

Properties

Path

FdbPath Path { get; }

Path of the directory subspace that contains the subspace.

This path is always absolute. Relative paths are not allowed. Can be if this subspace is located at the root of the database (ie: not using the Directory Layer)

Prefix

Slice Prefix { get; }

Optional key prefix of the subspace, added immediately after the prefix of the subspace resolved by the Path.

Methods

Resolve

ValueTask<IKeySubspace> Resolve(IFdbReadOnlyTransaction tr, FdbDirectoryLayer directory = null)

Resolves the subspace for this location, or throws if it does not exist.

  • tr — Transaction used for this operation.
  • directory — Optional Directory Layer to use; otherwise, uses the global instance for the transaction's database.

Returns: Resolved subspace if found

The subspace may be cached, and be obsolete. The cache will add deferred value checks to the transaction, that will cause it to conflict and retry, if the directory has been deleted or has moved.

TryResolve

ValueTask<IKeySubspace> TryResolve(IFdbReadOnlyTransaction tr, FdbDirectoryLayer directory = null)

Resolves the subspace for this location, if it exists

  • tr — Transaction used for this operation.
  • directory — Optional Directory Layer to use; otherwise, uses the global instance for the transaction's database.

Returns: Resolved subspace if found; otherwise, null

The subspace may be cached, and be obsolete. The cache will add deferred value checks to the transaction, that will cause it to conflict and retry, if the directory has been deleted or has moved.