Property | Type | Description | |
---|---|---|---|
CreateClusterInternalAsync | Task |
||
DieOnError | void | ||
EnsureIsStarted | void | ||
EnsureNotOnNetworkThread | void | ||
EventLoop | void | ||
FailCannotExecuteOnNetworkThread | void | ||
OpenInternalAsync | Task |
||
SetNetworkOption | FdbError | ||
SetNetworkOption | FdbError | ||
StartEventLoop | void | ||
StopEventLoop | void |
Method | Description | |
---|---|---|
CreateClusterAsync ( |
Opens a connection to an existing FoundationDB cluster using the default cluster file
|
|
CreateClusterAsync ( string clusterFile, |
Opens a connection to an existing FDB Cluster
|
|
Failed ( FdbError code ) : bool |
Returns true if the error code represents a failure
|
|
GetErrorMessage ( FdbError code ) : string |
Return the error message matching the specified error code
|
|
GetMaxApiVersion ( ) : int |
Returns the maximum API version currently supported by the installed client. The version of the installed client (fdb_c.dll) can be different higher (or lower) than the version supported by this binding (FoundationDB.Client.dll)! If you want the highest possible version that is supported by both the binding and the client, you must call GetMaxSafeApiVersion. Attempts to select an API version higher than this value will fail. |
|
GetMaxSafeApiVersion ( ) : int |
Returns the maximum API version that is supported by both this binding and the installed client. This value can be lower than the value returned by GetMaxApiVersion if the FoundationDB client installed on this machine is more recent that the version of this assembly. Using this version may break your application if new features change the behavior of the client (ex: default mode for snapshot transactions between v2.x and v3.x). |
|
GetMinApiVersion ( ) : int |
Returns the minimum API version currently supported by this binding. Attempts to select an API version lower than this value will fail. |
|
MapToException ( FdbError code ) : |
Maps an error code into an Exception (to be throwned)
|
|
OpenAsync ( |
Create a new connection with the "DB" database on the cluster specified by the default cluster file. Since connections are not pooled, so this method can be costly and should NOT be called every time you need to read or write from the database. Instead, you should open a database instance at the start of your process, and use it a singleton. |
|
OpenAsync ( FdbSubspace globalSpace, |
Create a new connection with the "DB" database on the cluster specified by the default cluster file, and with the specified global subspace Since connections are not pooled, so this method can be costly and should NOT be called every time you need to read or write from the database. Instead, you should open a database instance at the start of your process, and use it a singleton. |
|
OpenAsync ( string clusterFile, string dbName, |
Create a new connection with a database on the specified cluster As of 1.0, the only supported database name is "DB"Since connections are not pooled, so this method can be costly and should NOT be called every time you need to read or write from the database. Instead, you should open a database instance at the start of your process, and use it a singleton. |
|
OpenAsync ( string clusterFile, string dbName, FdbSubspace globalSpace, bool readOnly = false, |
Create a new connection with a database on the specified cluster As of 1.0, the only supported database name is 'DB'Since connections are not pooled, so this method can be costly and should NOT be called every time you need to read or write from the database. Instead, you should open a database instance at the start of your process, and use it a singleton. |
|
Start ( ) : void |
Start the Network Thread, using the currently selected API version level If you need a specific API version level, it must be defined by either calling UseApiVersion before calling this method, or by using the Start(int) override. Otherwise, the default API version will be selected. |
|
Start ( int apiVersion ) : void |
Select the API version level to use in this process, and start the Network Thread
|
|
Stop ( ) : void |
Stop the Network Thread
|
|
Success ( FdbError code ) : bool |
Returns true if the error code represents a success
|
|
UseApiVersion ( int value ) : void |
Sets the desired API version of the binding. The selected version level may affect the availability and behavior or certain features. The version can only be set before calling Fdb.Start() or any method that indirectly calls it. If you want to be on the bleeding edge, you can use GetMaxSafeApiVersion to get the maximum version supported by both this bindign and the FoundationDB client. If you want to be conservative, you should target a specific version level, and only change to newer versions after making sure that all tests are passing! |
Method | Description | |
---|---|---|
CreateClusterInternalAsync ( string clusterFile, |
||
DieOnError ( FdbError code ) : void |
Throws an exception if the code represents a failure
|
|
EnsureIsStarted ( ) : void |
Ensure that we have loaded the C API library, and that the Network Thread has been started
|
|
EnsureNotOnNetworkThread ( [ callerMethod = null ) : void |
Throws if the current thread is the Network Thread. Should be used to ensure that we do not execute tasks continuations from the network thread, to avoid dead-locks. |
|
EventLoop ( ) : void | ||
FailCannotExecuteOnNetworkThread ( ) : void | ||
OpenInternalAsync ( string clusterFile, string dbName, FdbSubspace globalSpace, bool readOnly, |
Create a new database handler instance using the specificied cluster file, database name, global subspace and read only settings
|
|
SetNetworkOption ( FdbNetworkOption option, Slice value ) : FdbError |
Set the value of a network option on the database handler
|
|
SetNetworkOption ( FdbNetworkOption option, string value ) : FdbError |
Set the value of a network option on the database handler
|
|
StartEventLoop ( ) : void |
Starts the thread running the FDB event loop
|
|
StopEventLoop ( ) : void |
Stops the thread running the FDB event loop
|
public static CreateClusterAsync ( |
||
cancellationToken | Token used to abort the operation | |
return | Task |
public static CreateClusterAsync ( string clusterFile, |
||
clusterFile | string | Path to the 'fdb.cluster' file to use, or null for the default cluster file |
cancellationToken | Token used to abort the operation | |
return | Task |
public static Failed ( FdbError code ) : bool | ||
code | FdbError | |
return | bool |
public static GetErrorMessage ( FdbError code ) : string | ||
code | FdbError | |
return | string |
public static MapToException ( FdbError code ) : |
||
code | FdbError | |
return |
public static OpenAsync ( |
||
cancellationToken | Token used to abort the operation | |
return | Task |
public static OpenAsync ( FdbSubspace globalSpace, |
||
globalSpace | FdbSubspace | Global subspace used as a prefix for all keys and layers |
cancellationToken | Token used to abort the operation | |
return | Task |
public static OpenAsync ( string clusterFile, string dbName, |
||
clusterFile | string | Path to the 'fdb.cluster' file to use, or null for the default cluster file |
dbName | string | Name of the database, or "DB" if not specified. |
cancellationToken | Cancellation Token | |
return | Task |
public static OpenAsync ( string clusterFile, string dbName, FdbSubspace globalSpace, bool readOnly = false, |
||
clusterFile | string | Path to the 'fdb.cluster' file to use, or null for the default cluster file |
dbName | string | Name of the database. Must be 'DB' |
globalSpace | FdbSubspace | Global subspace used as a prefix for all keys and layers |
readOnly | bool | If true, the database instance will only allow read operations |
cancellationToken | Token used to abort the operation | |
return | Task |
public static Start ( int apiVersion ) : void | ||
apiVersion | int | |
return | void |
public static Success ( FdbError code ) : bool | ||
code | FdbError | |
return | bool |
public static UseApiVersion ( int value ) : void | ||
value | int | |
return | void |