IFdbDatabaseHandler
Namespace: FoundationDB.Client.Core · interface
Implements: IDisposable
Basic API for FoundationDB databases
Properties
ClusterFile
string ClusterFile { get; }
Full path to the '.cluster' file that contains the connection string to the cluster
ConnectionString
string ConnectionString { get; }
Connection string to the cluster
IsClosed
bool IsClosed { get; }
Returns true if the handler has already been terminated
IsInvalid
bool IsInvalid { get; }
Returns true if the handler failed to initialize
Methods
CreateSnapshotAsync
Task CreateSnapshotAsync(ReadOnlySpan<char> uid, ReadOnlySpan<char> snapCommand, CancellationToken ct)
CreateTransaction
IFdbTransactionHandler CreateTransaction(FdbOperationContext context)
Gets the IFdbTransactionHandler for a new transaction to read and/or write to this database
ForceRecoveryWithDataLossAsync
Task ForceRecoveryWithDataLossAsync(ReadOnlySpan<char> dcId, CancellationToken ct)
GetApiVersion
int GetApiVersion()
Returns the currently selected API version for this native handler.
GetClientStatus
Task<Slice> GetClientStatus(CancellationToken ct)
GetMainThreadBusyness
double GetMainThreadBusyness()
Returns a value where 0 indicates that the client is idle and 1 (or larger) indicates that the client is saturated.
GetMaxApiVersion
int GetMaxApiVersion()
Returns the maximum API version that is supported by this native handler.
GetServerProtocolVersionAsync
Task<FdbProtocolVersion> GetServerProtocolVersionAsync(FdbProtocolVersion expectedVersion, CancellationToken ct)
Returns the protocol version reported by the coordinator this client is connected to.
expectedVersion— If this value is not equal to None, the task will not complete until the protocol version isdifferentthan expected (orctfires).ct— Token used to cancel the operation.
Returns: Task that returns the current protocol version
This will never complete if the remote server is running a protocol from FDB 5.0 or older.
OpenTenant
IFdbTenantHandler OpenTenant(FdbTenantName name)
Gets the handler for a specific tenant in the database
RebootWorkerAsync
Task RebootWorkerAsync(ReadOnlySpan<char> name, bool check, int duration, CancellationToken ct)
SetOption
void SetOption(FdbDatabaseOption option, ReadOnlySpan<byte> data)
Set the value of a database option