C# Class FoundationDB.Client.Fdb.System

Helper class for reading from the reserved System subspace
Show file Open project: BedeGaming/foundationdb-dotnet-client

Public Properties

Property Type Description
BackupDataFormat Slice
ConfigPrefix Slice
Coordinators Slice
GlobalsPrefix Slice
InitId Slice
KeyServers Slice
MaxValue Slice
MinValue Slice
ServerKeys Slice
ServerList Slice
WorkersPrefix Slice

Public Methods

Method Description
ConfigKey ( [ name ) : Slice

Return the corresponding key for a config attribute

EstimateCountAsync ( [ db, FdbKeyRange range, CancellationToken cancellationToken ) : Task

Estimate the number of keys in the specified range.

If the range contains a large of number keys, the operation may need more than one transaction to complete, meaning that the number will not be transactionally accurate.

EstimateCountAsync ( [ db, FdbKeyRange range, Slice>.IProgress onProgress, CancellationToken cancellationToken ) : Task

Estimate the number of keys in the specified range.

If the range contains a large of number keys, the operation may need more than one transaction to complete, meaning that the number will not be transactionally accurate.

EstimateCountAsync ( [ db, Slice beginInclusive, Slice endExclusive, Slice>.IProgress onProgress, CancellationToken cancellationToken ) : Task

Estimate the number of keys in the specified range.

If the range contains a large of number keys, the operation may need more than one transaction to complete, meaning that the number will not be transactionally accurate.

GetBoundaryKeysAsync ( [ trans, Slice beginInclusive, Slice endExclusive ) : Task>

Returns a list of keys k such that beginInclusive <= k < endExclusive and k is located at the start of a contiguous range stored on a single server

This method is not transactional. It will return an answer no older than the Transaction object it is passed, but the returned boundaries are an estimate and may not represent the exact boundary locations at any database version.

GetBoundaryKeysAsync ( [ db, Slice beginInclusive, Slice endExclusive, CancellationToken cancellationToken ) : Task>

Returns a list of keys k such that beginInclusive <= k < endExclusive and k is located at the start of a contiguous range stored on a single server

This method is not transactional. It will return an answer no older than the Database object it is passed, but the returned boundaries are an estimate and may not represent the exact boundary locations at any database version.

GetChunksAsync ( [ db, FdbKeyRange range, CancellationToken cancellationToken ) : Task>

Split a range of keys into smaller chunks where each chunk represents a contiguous range stored on a single server

This method is not transactional. It will return an answer no older than the Database object it is passed, but the returned ranges are an estimate and may not represent the exact boundary locations at any database version.

GetChunksAsync ( [ db, Slice beginInclusive, Slice endExclusive, CancellationToken cancellationToken ) : Task>

Split a range of keys into chunks representing a contiguous range stored on a single server

This method is not transactional. It will return an answer no older than the Database object it is passed, but the returned ranges are an estimate and may not represent the exact boundary locations at any database version.

GetConfigParameterAsync ( [ db, [ name, CancellationToken cancellationToken ) : Task

Return the value of a configuration parameter (located under '\xFF/conf/')

GetCoordinatorsAsync ( [ db, CancellationToken cancellationToken ) : Task

Returns an object describing the list of the current coordinators for the cluster

Since the list of coordinators may change at anytime, the results may already be obsolete once this method completes!

GetStatusAsync ( [ trans ) : Task
GetStatusAsync ( [ db, CancellationToken ct ) : Task
GetStorageEngineModeAsync ( [ db, CancellationToken cancellationToken ) : Task

Returns the current storage engine mode of the cluster

Will return a string starting with "unknown" if the storage engine mode is not recognized

GlobalsKey ( [ name ) : Slice

Return the corresponding key for a global attribute

WorkersKey ( [ id, [ name ) : Slice

Return the corresponding key for a global attribute

Private Methods

Method Description
GetBoundaryKeysInternalAsync ( [ trans, Slice begin, Slice end ) : Task>

Method Details

ConfigKey() public static method

Return the corresponding key for a config attribute
public static ConfigKey ( [ name ) : Slice
name [ "foo"
return Slice

EstimateCountAsync() public static method

Estimate the number of keys in the specified range.
If the range contains a large of number keys, the operation may need more than one transaction to complete, meaning that the number will not be transactionally accurate.
public static EstimateCountAsync ( [ db, FdbKeyRange range, CancellationToken cancellationToken ) : Task
db [ Database used for the operation
range FdbKeyRange Range defining the keys to count
cancellationToken System.Threading.CancellationToken Token used to cancel the operation
return Task

EstimateCountAsync() public static method

Estimate the number of keys in the specified range.
If the range contains a large of number keys, the operation may need more than one transaction to complete, meaning that the number will not be transactionally accurate.
public static EstimateCountAsync ( [ db, FdbKeyRange range, Slice>.IProgress onProgress, CancellationToken cancellationToken ) : Task
db [ Database used for the operation
range FdbKeyRange Range defining the keys to count
onProgress Slice>.IProgress Optional callback called everytime the count is updated. The first argument is the current count, and the second argument is the last key that was found.
cancellationToken System.Threading.CancellationToken Token used to cancel the operation
return Task

EstimateCountAsync() public static method

Estimate the number of keys in the specified range.
If the range contains a large of number keys, the operation may need more than one transaction to complete, meaning that the number will not be transactionally accurate.
public static EstimateCountAsync ( [ db, Slice beginInclusive, Slice endExclusive, Slice>.IProgress onProgress, CancellationToken cancellationToken ) : Task
db [ Database used for the operation
beginInclusive Slice Key defining the beginning of the range
endExclusive Slice Key defining the end of the range
onProgress Slice>.IProgress Optional callback called everytime the count is updated. The first argument is the current count, and the second argument is the last key that was found.
cancellationToken System.Threading.CancellationToken Token used to cancel the operation
return Task

GetBoundaryKeysAsync() public static method

Returns a list of keys k such that beginInclusive <= k < endExclusive and k is located at the start of a contiguous range stored on a single server
This method is not transactional. It will return an answer no older than the Transaction object it is passed, but the returned boundaries are an estimate and may not represent the exact boundary locations at any database version.
public static GetBoundaryKeysAsync ( [ trans, Slice beginInclusive, Slice endExclusive ) : Task>
trans [ Transaction to use for the operation
beginInclusive Slice First key (inclusive) of the range to inspect
endExclusive Slice End key (exclusive) of the range to inspect
return Task>

GetBoundaryKeysAsync() public static method

Returns a list of keys k such that beginInclusive <= k < endExclusive and k is located at the start of a contiguous range stored on a single server
This method is not transactional. It will return an answer no older than the Database object it is passed, but the returned boundaries are an estimate and may not represent the exact boundary locations at any database version.
public static GetBoundaryKeysAsync ( [ db, Slice beginInclusive, Slice endExclusive, CancellationToken cancellationToken ) : Task>
db [ Database to use for the operation
beginInclusive Slice First key (inclusive) of the range to inspect
endExclusive Slice End key (exclusive) of the range to inspect
cancellationToken System.Threading.CancellationToken Token used to cancel the operation
return Task>

GetChunksAsync() public static method

Split a range of keys into smaller chunks where each chunk represents a contiguous range stored on a single server
This method is not transactional. It will return an answer no older than the Database object it is passed, but the returned ranges are an estimate and may not represent the exact boundary locations at any database version.
public static GetChunksAsync ( [ db, FdbKeyRange range, CancellationToken cancellationToken ) : Task>
db [ Database to use for the operation
range FdbKeyRange Range of keys to split up into smaller chunks
cancellationToken System.Threading.CancellationToken Token used to cancel the operation
return Task>

GetChunksAsync() public static method

Split a range of keys into chunks representing a contiguous range stored on a single server
This method is not transactional. It will return an answer no older than the Database object it is passed, but the returned ranges are an estimate and may not represent the exact boundary locations at any database version.
public static GetChunksAsync ( [ db, Slice beginInclusive, Slice endExclusive, CancellationToken cancellationToken ) : Task>
db [ Database to use for the operation
beginInclusive Slice First key (inclusive) of the range to inspect
endExclusive Slice End key (exclusive) of the range to inspect
cancellationToken System.Threading.CancellationToken Token used to cancel the operation
return Task>

GetConfigParameterAsync() public static method

Return the value of a configuration parameter (located under '\xFF/conf/')
public static GetConfigParameterAsync ( [ db, [ name, CancellationToken cancellationToken ) : Task
db [ Database to use for the operation
name [ Name of the configuration key (ex: "storage_engine")
cancellationToken System.Threading.CancellationToken Token used to cancel the operation
return Task

GetCoordinatorsAsync() public static method

Returns an object describing the list of the current coordinators for the cluster
Since the list of coordinators may change at anytime, the results may already be obsolete once this method completes!
public static GetCoordinatorsAsync ( [ db, CancellationToken cancellationToken ) : Task
db [ Database to use for the operation
cancellationToken System.Threading.CancellationToken Token used to cancel the operation
return Task

GetStatusAsync() public static method

public static GetStatusAsync ( [ trans ) : Task
trans [
return Task

GetStatusAsync() public static method

public static GetStatusAsync ( [ db, CancellationToken ct ) : Task
db [
ct System.Threading.CancellationToken
return Task

GetStorageEngineModeAsync() public static method

Returns the current storage engine mode of the cluster
Will return a string starting with "unknown" if the storage engine mode is not recognized
public static GetStorageEngineModeAsync ( [ db, CancellationToken cancellationToken ) : Task
db [ Database to use for the operation
cancellationToken System.Threading.CancellationToken Token used to cancel the operation
return Task

GlobalsKey() public static method

Return the corresponding key for a global attribute
public static GlobalsKey ( [ name ) : Slice
name [ "foo"
return Slice

WorkersKey() public static method

Return the corresponding key for a global attribute
public static WorkersKey ( [ id, [ name ) : Slice
id [ "ABC123"
name [ "foo"
return Slice

Property Details

BackupDataFormat public static property

"\xFF/backupDataFormat"
public static Slice BackupDataFormat
return Slice

ConfigPrefix public static property

"\xFF/conf/"
public static Slice ConfigPrefix
return Slice

Coordinators public static property

"\xFF/coordinators"
public static Slice Coordinators
return Slice

GlobalsPrefix public static property

"\xFF/globals/"
public static Slice GlobalsPrefix
return Slice

InitId public static property

"\xFF/init_id"
public static Slice InitId
return Slice

KeyServers public static property

"\xFF/keyServer/(key_boundary)" => (..., node_id, ...)
public static Slice KeyServers
return Slice

MaxValue public static property

"\xFF\xFF"
public static Slice MaxValue
return Slice

MinValue public static property

"\xFF\x00"
public static Slice MinValue
return Slice

ServerKeys public static property

"\xFF/serverKeys/(node_id)/(key_boundary)" => ('' | '1')
public static Slice ServerKeys
return Slice

ServerList public static property

"\xFF/serverList/(node_id)" => (..., node_id, machine_id, datacenter_id, ...)
public static Slice ServerList
return Slice

WorkersPrefix public static property

"\xFF/workers/(ip:port)/..." => datacenter + machine + mclass
public static Slice WorkersPrefix
return Slice