Skip to content

AzureTableTransactionalStateStorage<TState> Methods

Provides Azure Table Storage-backed transactional state storage.

Load

View source
public Task<TransactionalStorageLoadResponse<TState>> Load()
Loads the authoritative transactional state from durable storage.

Returns

A task whose result is a coherent snapshot containing the current ETag, committed state and sequence number, transaction metadata, and pending prepare records in sequence-number order.

Store(string?, TransactionalStateMetaData, List<PendingTransactionState<TState>>, long?, long?)

View source
public Task<string> Store(string? expectedETag, TransactionalStateMetaData metadata, List<PendingTransactionState<TState>>? statesToPrepare, long? commitUpTo, long? abortAfter)
Stores transactional state changes.

Parameters

expectedETagstring?
The ETag from the most recent Orleans.Transactions.Abstractions.ITransactionalStateStorage.Load or successful Orleans.Transactions.Abstractions.ITransactionalStateStorage.Store, identifying the durable version to update.
metadataTransactionalStateMetaData
The transaction metadata which replaces the currently stored metadata.
statesToPrepareList<PendingTransactionState<TState>>
Prepare records to add or replace, keyed by their sequence numbers. A record replaces an existing record with the same sequence number. A null or empty list adds no prepare records.
commitUpTolong?
When non-null, advances the committed state through the prepared state with this sequence number and makes prepare records at or below that sequence obsolete.
abortAfterlong?
When non-null, removes pending prepare records whose sequence numbers are strictly greater than this value.

Returns

A task whose result is the ETag of the durable state produced by the completed operation. The returned ETag is used as expectedETag for the next update.

Exceptions

System.ArgumentNullException
metadata is null.