Skip to content

ITransactionAgent Methods

The Transaction Agent it is used by the silo and activations to interact with the transactions system.

Abort(TransactionInfo)

abstract
public abstract Task Abort(TransactionInfo transactionInfo)
Abort a transaction.

Parameters

transactionInfoTransactionInfo

Returns

None.

Resolve(TransactionInfo)

abstract
public abstract Task<(TransactionalStatus Status, Exception exception)> ITransactionAgent.Resolve(TransactionInfo transactionInfo)
Attempt to Resolve a transaction. Will commit or abort transaction

Parameters

transactionInfoTransactionInfo
transaction info

Returns

null if the transaction committed successfully, or an exception otherwise. If the exception is OrleansTransactionInDoubtException, it means the outcome of the Commit cannot be determined; otherwise, the transaction is guaranteed to not have taken effect.

StartTransaction(bool, TimeSpan)

abstract
public abstract Task<TransactionInfo> StartTransaction(bool readOnly, TimeSpan timeout)
Starts a new transaction

Parameters

readOnlybool
Whether it is a read-only transaction
timeoutTimeSpan
Transaction is automatically aborted if it does not complete within this time

Returns

Info of the new transaction