Skip to content

TransactionManagerExtension Methods

Dispatches transaction coordination messages to transaction managers registered on the current grain.

Ping(string, Guid, DateTime, ParticipantId)

View source
public Task Ping(string resourceId, Guid transactionId, DateTime timeStamp, ParticipantId resource)
Reports that a participant is awaiting a transaction outcome.

Parameters

resourceIdstring
The transaction manager resource identifier.
transactionIdGuid
The transaction identifier.
timeStampDateTime
The commit timestamp.
resourceParticipantId
The reporting participant.

Returns

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

Ping(string, Guid, DateTime, ParticipantId, CancellationToken)

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

Parameters

resourceIdstring
The transaction manager resource identifier.
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(string, Guid, AccessCounter, DateTime, List<ParticipantId>, int)

View source
public Task<TransactionalStatus> PrepareAndCommit(string resourceId, Guid transactionId, AccessCounter accessCount, DateTime timeStamp, List<ParticipantId> writeResources, int totalResources)
Requests that the specified transaction manager prepare and commit a transaction.

Parameters

resourceIdstring
The identifier of the transaction manager resource.
transactionIdGuid
The transaction identifier.
accessCountAccessCounter
The number of reads and writes performed on the transaction manager by the transaction.
timeStampDateTime
The transaction commit timestamp.
writeResourcesList<ParticipantId>
The participants which wrote during the transaction.
totalResourcesint
The total number of participants in the transaction.

Returns

A task whose result is the final transaction status.

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

View source
public Task<TransactionalStatus> PrepareAndCommit(string resourceId, Guid transactionId, AccessCounter accessCount, DateTime timeStamp, List<ParticipantId> writeResources, int totalResources, CancellationToken cancellationToken)
Requests that the specified transaction manager prepare and commit a transaction.

Parameters

resourceIdstring
The identifier of the transaction manager resource.
transactionIdGuid
The transaction identifier.
accessCountAccessCounter
The number of reads and writes performed on the transaction manager by the transaction.
timeStampDateTime
The transaction commit timestamp.
writeResourcesList<ParticipantId>
The participants which wrote during the transaction.
totalResourcesint
The total number of participants in the transaction.
cancellationTokenCancellationToken
The token used to cancel the operation.

Returns

A task whose result is the final transaction status.

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

View source
public Task Prepared(string resourceId, Guid transactionId, DateTime timestamp, ParticipantId resource, TransactionalStatus status)
Reports the result of preparing a participant to the specified transaction manager.

Parameters

resourceIdstring
The identifier of the transaction manager resource.
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 one-way operation.

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

View source
public Task Prepared(string resourceId, Guid transactionId, DateTime timestamp, ParticipantId resource, TransactionalStatus status, CancellationToken cancellationToken)
Reports the result of preparing a participant to the specified transaction manager.

Parameters

resourceIdstring
The identifier of the transaction manager resource.
transactionIdGuid
The transaction identifier.
timestampDateTime
The transaction commit timestamp.
resourceParticipantId
The participant reporting its prepare result.
statusTransactionalStatus
The participant's prepare result.
cancellationTokenCancellationToken
The token used to cancel the operation.

Returns

A task which represents the one-way operation.