Skip to content

ITransactionManager Methods

Coordinates the prepare and commit protocol for a transaction.

Ping(Guid, DateTime, ParticipantId)

abstract
View source
public abstract Task Ping(Guid transactionId, DateTime timeStamp, ParticipantId resource)
One-way message sent by participants to TM, to let TM know they are still waiting to hear about the fate of a transaction.

Parameters

transactionIdGuid
The transaction identifier.
timeStampDateTime
The transaction commit timestamp.
resourceParticipantId
The participant awaiting the transaction outcome.

Returns

A task which represents the operation.

Ping(Guid, DateTime, ParticipantId, CancellationToken)

virtual
View source
public virtual Task Ping(Guid transactionId, DateTime timeStamp, ParticipantId resource, CancellationToken cancellationToken)
Reports that a participant is awaiting the outcome of a transaction.

Parameters

transactionIdGuid
The transaction identifier.
timeStampDateTime
The commit timestamp.
resourceParticipantId
The reporting participant.
cancellationTokenCancellationToken
The cancellation token.

Returns

A System.Threading.Tasks.Task representing the operation.

PrepareAndCommit(Guid, AccessCounter, DateTime, List<ParticipantId>, int)

abstract
View source
public abstract Task<TransactionalStatus> PrepareAndCommit(Guid transactionId, AccessCounter accessCount, DateTime timeStamp, List<ParticipantId> writerResources, int totalParticipants)
Request sent by TA to TM. The TM responds after committing or aborting the transaction.

Parameters

transactionIdGuid
The identifier of the transaction to prepare.
accessCountAccessCounter
The number of reads and writes performed on this participant by the transaction.
timeStampDateTime
The transaction commit timestamp.
writerResourcesList<ParticipantId>
The participants which wrote during the transaction.
totalParticipantsint
The total number of participants in the transaction.

Returns

A task whose result is the final transaction status.

PrepareAndCommit(Guid, AccessCounter, DateTime, List<ParticipantId>, int, CancellationToken)

virtual
View source
public virtual Task<TransactionalStatus> PrepareAndCommit(Guid transactionId, AccessCounter accessCount, DateTime timeStamp, List<ParticipantId> writerResources, int totalParticipants, CancellationToken cancellationToken)
Prepares and commits a transaction.

Parameters

transactionIdGuid
The transaction identifier.
accessCountAccessCounter
The number of resource accesses performed by the transaction.
timeStampDateTime
The commit timestamp.
writerResourcesList<ParticipantId>
The participants which wrote during the transaction.
totalParticipantsint
The total number of participants.
cancellationTokenCancellationToken
The cancellation token.

Returns

The transaction status.

Prepared(Guid, DateTime, ParticipantId, TransactionalStatus)

abstract
View source
public abstract Task Prepared(Guid transactionId, DateTime timeStamp, ParticipantId resource, TransactionalStatus status)
One-way message sent by a participant to the TM after it (successfully or unsuccessfully) prepares.

Parameters

transactionIdGuid
The transaction identifier.
timeStampDateTime
The transaction commit timestamp.
resourceParticipantId
The participant reporting its prepare result.
statusTransactionalStatus
The participant's prepare result.

Returns

A task which represents the operation.

Prepared(Guid, DateTime, ParticipantId, TransactionalStatus, CancellationToken)

virtual
View source
public virtual Task Prepared(Guid transactionId, DateTime timeStamp, ParticipantId resource, TransactionalStatus status, CancellationToken cancellationToken)
Reports that a participant has prepared.

Parameters

transactionIdGuid
The transaction identifier.
timeStampDateTime
The commit timestamp.
resourceParticipantId
The reporting participant.
statusTransactionalStatus
The prepare status.
cancellationTokenCancellationToken
The cancellation token.

Returns

A System.Threading.Tasks.Task representing the operation.