Carries the identity, timing, participant access, and commit state of a transaction.
View sourcepublic TransactionInfo Fork()
Creates transaction information for a forked call and records that the call is pending.
Returns
A new transaction branch containing the transaction-wide metadata from this instance.
View sourcepublic void Join(TransactionInfo x)
Queues a completed transaction branch for reconciliation with this instance.
Parameters
xTransactionInfo- The completed transaction branch to join.
View sourcepublic OrleansTransactionAbortedException? MustAbort(Serializer<OrleansTransactionAbortedException> serializer)
Determines whether the transaction must abort because an exception was recorded or forked calls remain outstanding.
Parameters
serializerSerializer<OrleansTransactionAbortedException>- The serializer used to deserialize a recorded transaction exception.
Returns
The recorded abort exception, an orphan-call exception for outstanding calls, or null when the transaction has no mandatory abort condition.
View sourcepublic void ReconcilePending()
Merges all joined transaction branches and updates the outstanding-call count.
View sourcepublic void RecordException(Exception e, Serializer<OrleansTransactionAbortedException> sm)
Records the first exception raised by transaction execution as a serialized transaction abort exception.
Parameters
eException- The exception raised during transaction execution.
smSerializer<OrleansTransactionAbortedException>- The serializer used to store the exception for transaction propagation.
View sourcepublic void RecordRead(ParticipantId id, DateTime minTime)
Records a participant read and advances the transaction timestamp when required.
Parameters
idParticipantId- The participant which was read.
minTimeDateTime- The minimum timestamp which the transaction must observe after the read.
View sourcepublic void RecordWrite(ParticipantId id, DateTime minTime)
Records a participant write and advances the transaction timestamp when required.
Parameters
idParticipantId- The participant which was written.
minTimeDateTime- The minimum timestamp which the transaction must observe after the write.
View sourcepublic override string ToString()
Returns a diagnostic representation of the transaction and its participant accesses.
Returns
A string containing transaction timing, outcome state, and participant access counts.