FdbDatabaseProviderOptions

Namespace: FoundationDB.DependencyInjection · class

Implements: IEquatable<FdbDatabaseProviderOptions>

Constructors

FdbDatabaseProviderOptions

FdbDatabaseProviderOptions()

Properties

ApiVersion

int ApiVersion { get; set; }

Selected API Version

AutoStart

bool AutoStart { get; set; }

Specifices whether we should automatically connect to the cluster, or if Start must be called explicitly

If true (by default), the first attempt to get the database instance will start the connection, if it is not already connected.

If false, the application must call Start explicitely sometimes during startup

Note that if autostart is enabled, the availability of the cluster will not be observed until the first transaction is started which could hide connectivity issues until later during the process lifetime.

AutoStop

bool AutoStop { get; set; }

Specifies whether the network loop should be automatically stopped when the database provider is disposed.

If true, disposing the database provider singleton will also stop the Network thread of the FoundationDB client and ensure any pending work is aborted safely.

If false (default), disposing the database provider singleton will let the Network thread running (if it has been started).

Please note that, once stopped, it is impossible to restart the Network thread. This is not a concern for traditionnal web host or API process, but prevents any other use cases where the provider must be restarted multiple times, like during unit testing.

ConnectionOptions

FdbConnectionOptions ConnectionOptions { get; set; }

DefaultLogHandler

Action<FdbTransactionLog> DefaultLogHandler { get; set; }

If not null, log handler that will be applied to all transactions

DefaultLogOptions

FdbLoggingOptions DefaultLogOptions { get; set; }

Default logging options

NativeLibraryPath

string NativeLibraryPath { get; set; }

Overrides the path to the native library (aka "fdb_c.dll", "fdb_c.so", ...) that must be used.

If null, pre-loading of the native C API library will be disabled, and the CLR will handle the binding of the library.

If empty, pre-loading of the native C API library will be enabled, and the operating system will handle the binding of the library.

If not empty, the native C API library will be pre-loaded using the specified path. If the file does not exist, is not readable, or is corrupted, the startup will fail.

Methods

<Clone>$

FdbDatabaseProviderOptions <Clone>$()

Equals

bool Equals(object obj)

bool Equals(FdbDatabaseProviderOptions other)

GetHashCode

int GetHashCode()

ToString

string ToString()