C# Класс FoundationDB.Client.Native.FdbNativeTransaction

Наследование: IFdbTransactionHandler
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddConflictRange() публичный Метод

public AddConflictRange ( Slice beginKeyInclusive, Slice endKeyExclusive, FdbConflictRangeType type ) : void
beginKeyInclusive Slice
endKeyExclusive Slice
type FdbConflictRangeType
Результат void

Atomic() публичный Метод

public Atomic ( Slice key, Slice param, FdbMutationType type ) : void
key Slice
param Slice
type FdbMutationType
Результат void

Cancel() публичный Метод

public Cancel ( ) : void
Результат void

Clear() публичный Метод

public Clear ( Slice key ) : void
key Slice
Результат void

ClearRange() публичный Метод

public ClearRange ( Slice beginKeyInclusive, Slice endKeyExclusive ) : void
beginKeyInclusive Slice
endKeyExclusive Slice
Результат void

CommitAsync() публичный Метод

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
Результат Task

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

FdbNativeTransaction() публичный Метод

public FdbNativeTransaction ( FdbNativeDatabase db, TransactionHandle handle ) : FoundationDB.Client.Core
db FdbNativeDatabase
handle TransactionHandle
Результат FoundationDB.Client.Core

GetAddressesForKeyAsync() публичный Метод

public GetAddressesForKeyAsync ( Slice key, CancellationToken cancellationToken ) : Task
key Slice
cancellationToken System.Threading.CancellationToken
Результат Task

GetAsync() публичный Метод

public GetAsync ( Slice key, bool snapshot, CancellationToken cancellationToken ) : Task
key Slice
snapshot bool
cancellationToken System.Threading.CancellationToken
Результат Task

GetCommittedVersion() публичный Метод

public GetCommittedVersion ( ) : long
Результат long

GetKeyAsync() публичный Метод

public GetKeyAsync ( FdbKeySelector selector, bool snapshot, CancellationToken cancellationToken ) : Task
selector FdbKeySelector
snapshot bool
cancellationToken System.Threading.CancellationToken
Результат Task

GetKeysAsync() публичный Метод

public GetKeysAsync ( FdbKeySelector selectors, bool snapshot, CancellationToken cancellationToken ) : Task
selectors FdbKeySelector
snapshot bool
cancellationToken System.Threading.CancellationToken
Результат Task

GetRangeAsync() публичный Метод

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
Результат Task

GetReadVersionAsync() публичный Метод

public GetReadVersionAsync ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken
Результат Task

GetValuesAsync() публичный Метод

public GetValuesAsync ( Slice keys, bool snapshot, CancellationToken cancellationToken ) : Task
keys Slice
snapshot bool
cancellationToken System.Threading.CancellationToken
Результат Task

OnErrorAsync() публичный Метод

public OnErrorAsync ( FdbError code, CancellationToken cancellationToken ) : Task
code FdbError
cancellationToken System.Threading.CancellationToken
Результат Task

Reset() публичный Метод

public Reset ( ) : void
Результат void

Set() публичный Метод

public Set ( Slice key, Slice value ) : void
key Slice
value Slice
Результат void

SetOption() публичный Метод

public SetOption ( FdbTransactionOption option, Slice data ) : void
option FdbTransactionOption
data Slice
Результат void

SetReadVersion() публичный Метод

public SetReadVersion ( long version ) : void
version long
Результат void

Watch() публичный Метод

public Watch ( Slice key, CancellationToken cancellationToken ) : FdbWatch
key Slice
cancellationToken System.Threading.CancellationToken
Результат FdbWatch