Inheritance: DurableEnlistmentState
Example #1
0
        internal override void Aborted(InternalEnlistment enlistment, Exception?e)
        {
            enlistment.Transaction._innerException ??= e;

            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);
        }
        internal override void Committed(InternalEnlistment enlistment)
        {
            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);

            // Change the transaction to committed.
            enlistment.Transaction.State.ChangeStatePromotedCommitted(enlistment.Transaction);
        }
        internal override void Aborted(InternalEnlistment enlistment, Exception e)
        {
            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);

            // Start the transaction aborting
            enlistment.Transaction.State.ChangeStateTransactionAborted(enlistment.Transaction, e);
        }
Example #4
0
        internal override void Committed(InternalEnlistment enlistment)
        {
            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);

            Debug.Assert(enlistment.Transaction.State != null);
            // Make the transaction commit
            enlistment.Transaction.State.ChangeStateTransactionCommitted(enlistment.Transaction);
        }
        internal override void EnlistmentDone(InternalEnlistment enlistment)
        {
            // EnlistmentDone should be treated the same as Committed from this state.
            // This eliminates a race between the SPC call and the EnlistmentDone call.

            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);

            // Make the transaction commit
            enlistment.Transaction.State.ChangeStateTransactionCommitted(enlistment.Transaction);
        }
Example #6
0
        internal override void Aborted(InternalEnlistment enlistment, Exception?e)
        {
            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);

            enlistment.Transaction._innerException ??= e;

            Debug.Assert(enlistment.Transaction.State != null);
            // Start the transaction aborting
            enlistment.Transaction.State.ChangeStatePromotedAborted(enlistment.Transaction);
        }
Example #7
0
        internal override void InDoubt(InternalEnlistment enlistment, Exception?e)
        {
            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);

            enlistment.Transaction._innerException ??= e;

            Debug.Assert(enlistment.Transaction.State != null);
            // Make the transaction in dobut
            enlistment.Transaction.State.InDoubtFromEnlistment(enlistment.Transaction);
        }
        internal override void Aborted(InternalEnlistment enlistment, Exception e)
        {
            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);

            if (enlistment.Transaction._innerException == null)
            {
                enlistment.Transaction._innerException = e;
            }

            // Start the transaction aborting
            enlistment.Transaction.State.ChangeStatePromotedAborted(enlistment.Transaction);
        }
        internal override void InDoubt(InternalEnlistment enlistment, Exception e)
        {
            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);

            if (enlistment.Transaction._innerException == null)
            {
                enlistment.Transaction._innerException = e;
            }

            // Make the transaction in dobut
            enlistment.Transaction.State.InDoubtFromEnlistment(enlistment.Transaction);
        }
Example #10
0
        internal override void InDoubt(InternalEnlistment enlistment, Exception?e)
        {
            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);

            enlistment.Transaction._innerException ??= e;

            Debug.Assert(enlistment.Transaction.State != null);
            // Tell the transaction that the enlistment is InDoubt.  Note that
            // for a transaction that has been delegated and then promoted there
            // are two chances to get a better answer than indoubt.  So it may be that
            // the TM will have a better answer.
            enlistment.Transaction.State.InDoubtFromEnlistment(enlistment.Transaction);
        }
 internal override void EnlistmentDone(InternalEnlistment enlistment)
 {
     // Transition to the ended state
     DurableEnlistmentEnded.EnterState(enlistment);
 }
 internal override void EnlistmentDone(InternalEnlistment enlistment)
 {
     // Mark the enlistment as done.
     DurableEnlistmentEnded.EnterState(enlistment);
 }