Class SagaPreparedTransition
Owns the exact encoded state and ordered effect inputs of one durable transition attempt.
public sealed class SagaPreparedTransition
- Inheritance
-
SagaPreparedTransition
- Inherited Members
- Extension Methods
Constructors
SagaPreparedTransition(SagaTransitionIdentity, long, long, long, bool, byte[], IReadOnlyList<SagaPreparedTimerMutation>, IReadOnlyList<IPreparedTransactionalOutboxWrite>, DateTimeOffset?, ISagaAtomicTimeoutParticipant?, bool, SagaTimeoutDeliveryIdentity?)
Initializes a prepared transition, copying state and hashing exact immutable prepared wire values.
public SagaPreparedTransition(SagaTransitionIdentity identity, long expectedVersion, long generation, long firstSequence, bool completed, byte[] encodedState, IReadOnlyList<SagaPreparedTimerMutation> timers, IReadOnlyList<IPreparedTransactionalOutboxWrite> writes, DateTimeOffset? completedAt = null, ISagaAtomicTimeoutParticipant? timeoutParticipant = null, bool isManualTimeout = false, SagaTimeoutDeliveryIdentity? ownedTimeout = null)
Parameters
identitySagaTransitionIdentityThe stable transition identity.
expectedVersionlongThe state CAS precondition, included in the digest but not receipt uniqueness.
generationlongThe current scheduling generation.
firstSequencelongThe first per-saga effect sequence from the loaded scope counter; not a global delivery-order promise.
completedboolWhether this transition seals its incarnation.
encodedStatebyte[]The already-serialized UTF-8 state including its processed marker.
timersIReadOnlyList<SagaPreparedTimerMutation>The ordered timer mutations.
writesIReadOnlyList<IPreparedTransactionalOutboxWrite>The ordered owning-provider prepared command/event writes.
completedAtDateTimeOffset?The original completion timestamp, preserved independently of the encoded state.
timeoutParticipantISagaAtomicTimeoutParticipantThe selected timer participant, required for timer mutations or owned timeout delivery; absent only with no selected timer store.
isManualTimeoutboolWhether explicit manual-timeout admission must be revalidated at commit.
ownedTimeoutSagaTimeoutDeliveryIdentityThe original owned timeout authority, revalidated for every NEW commit.
Properties
Completed
Gets whether the transition seals the incarnation.
public bool Completed { get; }
Property Value
CompletedAt
Gets the original exact completion timestamp, or null.
public DateTimeOffset? CompletedAt { get; }
Property Value
ExpectedVersion
Gets the state CAS precondition.
public long ExpectedVersion { get; }
Property Value
FirstSequence
Gets the first reserved effect sequence.
public long FirstSequence { get; }
Property Value
Generation
Gets the current scheduling generation.
public long Generation { get; }
Property Value
HasTimerParticipant
Gets whether this attempt captured a selected timer participant.
public bool HasTimerParticipant { get; }
Property Value
Remarks
The provider must refuse omission when its configured profile requires a timer participant.
Identity
Gets the immutable transition identity.
public SagaTransitionIdentity Identity { get; }
Property Value
IsManualTimeout
Gets whether explicit manual-timeout identity admission must be checked again under the commit scope lock.
public bool IsManualTimeout { get; }
Property Value
OwnedTimeout
Gets the immutable original owned timeout authority, or null for nonowned delivery.
public SagaTimeoutDeliveryIdentity? OwnedTimeout { get; }
Property Value
Timers
Gets immutable ordered timer mutations.
public IReadOnlyList<SagaPreparedTimerMutation> Timers { get; }
Property Value
Writes
Gets immutable owning-provider command/event handles.
public IReadOnlyList<IPreparedTransactionalOutboxWrite> Writes { get; }
Property Value
Methods
GetDigest()
Returns a caller-owned SHA-256 digest of the versioned exact transition representation.
public byte[] GetDigest()
Returns
- byte[]
The transition digest.
GetEncodedState()
Returns caller-owned encoded state bytes.
public byte[] GetEncodedState()
Returns
- byte[]
The exact copied state bytes.
ValidateTimerParticipant(IDbTransaction, byte[])
Validates selected timer ownership against the actual transaction writer before any writes.
public void ValidateTimerParticipant(IDbTransaction transaction, byte[] actualWriterBinding)
Parameters
transactionIDbTransactionThe actual open provider-owned transaction.
actualWriterBindingbyte[]The trusted kernel encoding of its actual backend and table.