Condividi tramite


Transaction.CommitAsync Method

Definition

Overloads

CommitAsync()

Commits the set of operations associated with the transaction. Replication and local disk writes are performed asynchronously

CommitAsync(TimeSpan)

Commits the set of operations that are associated with the transaction with an optional timeout. Replication and local disk writes are performed asynchronously. Note that the underlying replication operation may not have been cancelled even in the event of a timeout.

CommitAsync(TimeSpan, CancellationToken)
Obsolete.

Commits the set of operations that are associated with the transaction with an optional timeout. Replication and local disk writes are performed asynchronously. Note that the underlying replication operation may not have been cancelled even in the event of a timeout.

CommitAsync()

Commits the set of operations associated with the transaction. Replication and local disk writes are performed asynchronously

public System.Threading.Tasks.Task<long> CommitAsync ();
member this.CommitAsync : unit -> System.Threading.Tasks.Task<int64>
Public Function CommitAsync () As Task(Of Long)

Returns

A Task whose result is the Logical Sequence Number of the transaction. The sequence number is associated with all keys written in this transaction and can be passed into APIs accepting a check sequence number parameter to implement optimistic concurrency:

Applies to

CommitAsync(TimeSpan)

Commits the set of operations that are associated with the transaction with an optional timeout. Replication and local disk writes are performed asynchronously. Note that the underlying replication operation may not have been cancelled even in the event of a timeout.

public System.Threading.Tasks.Task<long> CommitAsync (TimeSpan timeout);
member this.CommitAsync : TimeSpan -> System.Threading.Tasks.Task<int64>
Public Function CommitAsync (timeout As TimeSpan) As Task(Of Long)

Parameters

timeout
TimeSpan

The amount of time to wait for replication and local disk writes to complete before TimeoutException is thrown.

Returns

A Task whose result is the Logical Sequence Number of the transaction. The sequence number is associated with all keys written in this transaction and can be passed into APIs accepting a check sequence number parameter to implement optimistic concurrency:

Applies to

CommitAsync(TimeSpan, CancellationToken)

Caution

Use CommitAsync() or CommitAsync(TimeSpan) overloads

Commits the set of operations that are associated with the transaction with an optional timeout. Replication and local disk writes are performed asynchronously. Note that the underlying replication operation may not have been cancelled even in the event of a timeout.

[System.Obsolete("Use CommitAsync() or CommitAsync(TimeSpan) overloads")]
public System.Threading.Tasks.Task<long> CommitAsync (TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
[<System.Obsolete("Use CommitAsync() or CommitAsync(TimeSpan) overloads")>]
member this.CommitAsync : TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int64>
Public Function CommitAsync (timeout As TimeSpan, cancellationToken As CancellationToken) As Task(Of Long)

Parameters

timeout
TimeSpan

The amount of time to wait for replication and local disk writes to complete before TimeoutException is thrown.

cancellationToken
CancellationToken

Currently not used. Reserved for future use.

Returns

A Task whose result is the Logical Sequence Number of the transaction. The sequence number is associated with all keys written in this transaction and can be passed into APIs accepting a check sequence number parameter to implement optimistic concurrency:

Attributes

Applies to