C# Class FoundationDB.Client.Native.FdbNativeTransaction

Inheritance: IFdbTransactionHandler
Afficher le fichier Open project: BedeGaming/foundationdb-dotnet-client

Méthodes publiques

Méthode Description
AddConflictRange ( Slice beginKeyInclusive, Slice endKeyExclusive, FdbConflictRangeType type ) : void
Atomic ( Slice key, Slice param, FdbMutationType type ) : void
Cancel ( ) : void
Clear ( Slice key ) : void
ClearRange ( Slice beginKeyInclusive, Slice endKeyExclusive ) : void
CommitAsync ( CancellationToken cancellationToken ) : Task

Attempts to commit the sets and clears previously applied to the database snapshot represented by this transaction to the actual database. The commit may or may not succeed – in particular, if a conflicting transaction previously committed, then the commit must fail in order to preserve transactional isolation. If the commit does succeed, the transaction is durably committed to the database and all subsequently started transactions will observe its effects.

As with other client/server databases, in some failure scenarios a client may be unable to determine whether a transaction succeeded. In these cases, CommitAsync() will throw CommitUnknownResult error. The OnErrorAsync() function treats this error as retryable, so retry loops that don’t check for CommitUnknownResult could execute the transaction twice. In these cases, you must consider the idempotence of the transaction.

Dispose ( ) : void
FdbNativeTransaction ( FdbNativeDatabase db, TransactionHandle handle ) : FoundationDB.Client.Core
GetAddressesForKeyAsync ( Slice key, CancellationToken cancellationToken ) : Task
GetAsync ( Slice key, bool snapshot, CancellationToken cancellationToken ) : Task
GetCommittedVersion ( ) : long
GetKeyAsync ( FdbKeySelector selector, bool snapshot, CancellationToken cancellationToken ) : Task
GetKeysAsync ( FdbKeySelector selectors, bool snapshot, CancellationToken cancellationToken ) : Task
GetRangeAsync ( FdbKeySelector begin, FdbKeySelector end, FdbRangeOptions options, int iteration, bool snapshot, CancellationToken cancellationToken ) : Task

Asynchronously fetch a new page of results

GetReadVersionAsync ( CancellationToken cancellationToken ) : Task
GetValuesAsync ( Slice keys, bool snapshot, CancellationToken cancellationToken ) : Task
OnErrorAsync ( FdbError code, CancellationToken cancellationToken ) : Task
Reset ( ) : void
Set ( Slice key, Slice value ) : void
SetOption ( FdbTransactionOption option, Slice data ) : void
SetReadVersion ( long version ) : void
Watch ( Slice key, CancellationToken cancellationToken ) : FdbWatch

Private Methods

Méthode Description
Dispose ( bool disposing ) : void
GetKeyResult ( FutureHandle h ) : Slice
GetKeyValueArrayResult ( FutureHandle h, bool &more ) : Slice>[].KeyValuePair
GetStringArrayResult ( FutureHandle h ) : string[]
GetValueResultBytes ( FutureHandle h ) : Slice
ResetInternal ( ) : void
TryGetValueResult ( FutureHandle h, Slice &result ) : bool

Method Details

AddConflictRange() public méthode

public AddConflictRange ( Slice beginKeyInclusive, Slice endKeyExclusive, FdbConflictRangeType type ) : void
beginKeyInclusive Slice
endKeyExclusive Slice
type FdbConflictRangeType
Résultat void

Atomic() public méthode

public Atomic ( Slice key, Slice param, FdbMutationType type ) : void
key Slice
param Slice
type FdbMutationType
Résultat void

Cancel() public méthode

public Cancel ( ) : void
Résultat void

Clear() public méthode

public Clear ( Slice key ) : void
key Slice
Résultat void

ClearRange() public méthode

public ClearRange ( Slice beginKeyInclusive, Slice endKeyExclusive ) : void
beginKeyInclusive Slice
endKeyExclusive Slice
Résultat void

CommitAsync() public méthode

Attempts to commit the sets and clears previously applied to the database snapshot represented by this transaction to the actual database. The commit may or may not succeed – in particular, if a conflicting transaction previously committed, then the commit must fail in order to preserve transactional isolation. If the commit does succeed, the transaction is durably committed to the database and all subsequently started transactions will observe its effects.
As with other client/server databases, in some failure scenarios a client may be unable to determine whether a transaction succeeded. In these cases, CommitAsync() will throw CommitUnknownResult error. The OnErrorAsync() function treats this error as retryable, so retry loops that don’t check for CommitUnknownResult could execute the transaction twice. In these cases, you must consider the idempotence of the transaction.
public CommitAsync ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken
Résultat Task

Dispose() public méthode

public Dispose ( ) : void
Résultat void

FdbNativeTransaction() public méthode

public FdbNativeTransaction ( FdbNativeDatabase db, TransactionHandle handle ) : FoundationDB.Client.Core
db FdbNativeDatabase
handle TransactionHandle
Résultat FoundationDB.Client.Core

GetAddressesForKeyAsync() public méthode

public GetAddressesForKeyAsync ( Slice key, CancellationToken cancellationToken ) : Task
key Slice
cancellationToken System.Threading.CancellationToken
Résultat Task

GetAsync() public méthode

public GetAsync ( Slice key, bool snapshot, CancellationToken cancellationToken ) : Task
key Slice
snapshot bool
cancellationToken System.Threading.CancellationToken
Résultat Task

GetCommittedVersion() public méthode

public GetCommittedVersion ( ) : long
Résultat long

GetKeyAsync() public méthode

public GetKeyAsync ( FdbKeySelector selector, bool snapshot, CancellationToken cancellationToken ) : Task
selector FdbKeySelector
snapshot bool
cancellationToken System.Threading.CancellationToken
Résultat Task

GetKeysAsync() public méthode

public GetKeysAsync ( FdbKeySelector selectors, bool snapshot, CancellationToken cancellationToken ) : Task
selectors FdbKeySelector
snapshot bool
cancellationToken System.Threading.CancellationToken
Résultat Task

GetRangeAsync() public méthode

Asynchronously fetch a new page of results
public GetRangeAsync ( FdbKeySelector begin, FdbKeySelector end, FdbRangeOptions options, int iteration, bool snapshot, CancellationToken cancellationToken ) : Task
begin FdbKeySelector
end FdbKeySelector
options FdbRangeOptions
iteration int
snapshot bool
cancellationToken System.Threading.CancellationToken
Résultat Task

GetReadVersionAsync() public méthode

public GetReadVersionAsync ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken
Résultat Task

GetValuesAsync() public méthode

public GetValuesAsync ( Slice keys, bool snapshot, CancellationToken cancellationToken ) : Task
keys Slice
snapshot bool
cancellationToken System.Threading.CancellationToken
Résultat Task

OnErrorAsync() public méthode

public OnErrorAsync ( FdbError code, CancellationToken cancellationToken ) : Task
code FdbError
cancellationToken System.Threading.CancellationToken
Résultat Task

Reset() public méthode

public Reset ( ) : void
Résultat void

Set() public méthode

public Set ( Slice key, Slice value ) : void
key Slice
value Slice
Résultat void

SetOption() public méthode

public SetOption ( FdbTransactionOption option, Slice data ) : void
option FdbTransactionOption
data Slice
Résultat void

SetReadVersion() public méthode

public SetReadVersion ( long version ) : void
version long
Résultat void

Watch() public méthode

public Watch ( Slice key, CancellationToken cancellationToken ) : FdbWatch
key Slice
cancellationToken System.Threading.CancellationToken
Résultat FdbWatch