public TransactionContextManager(ProtocolState state, string identifier) : base(state) { this.identifier = identifier; this.requests = new Queue<TransactionContextEnlistTransactionEvent>(); base.stateMachine = new TransactionContextStateMachine(this); base.stateMachine.ChangeState(state.States.TransactionContextInitializing); }
public VolatileCoordinatorEnlistment(ProtocolState state, CoordinatorEnlistment coordinator) : base(state) { this.coordinator = coordinator; base.enlistment = this.coordinator.Enlistment; base.stateMachine = this.coordinator.StateMachine; base.CreateParticipantService(); }
public TwoPhaseCommitParticipant(ProtocolState state) { this.state = state; this.durableSendComplete = Fx.ThunkCallback(new AsyncCallback(this.DurableSendComplete)); this.volatileSendComplete = Fx.ThunkCallback(new AsyncCallback(this.VolatileSendComplete)); this.politeSendComplete = Fx.ThunkCallback(new AsyncCallback(this.PoliteSendComplete)); }
public CoordinatorEnlistment(ProtocolState state, TransactionContextManager contextManager, CoordinationContext context, RequestSecurityTokenResponse rstr) : base(state) { base.ourContextManager = contextManager; this.superiorContext = context; this.superiorRstr = rstr; this.ConfigureEnlistment(context); base.stateMachine = new CoordinatorStateMachine(this); base.stateMachine.ChangeState(state.States.CoordinatorInitializing); }
protected StateMachine(TransactionEnlistment enlistment) { this.enlistment = enlistment; this.state = enlistment.State; this.synchronization = new SynchronizationManager(this); if (DebugTrace.Warning || DiagnosticUtility.ShouldTraceWarning) { this.history = new StateMachineHistory(); } }
public ParticipantEnlistment(ProtocolState state, Enlistment coordinatorEnlistment, TransactionContextManager contextManager) : base(state) { this.protocol = Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Volatile2PC; base.ourContextManager = contextManager; base.enlistment = new Enlistment(); base.enlistment.LocalTransactionId = coordinatorEnlistment.LocalTransactionId; base.enlistment.RemoteTransactionId = coordinatorEnlistment.RemoteTransactionId; base.enlistment.NotificationMask = Notifications.Volatile | Notifications.TwoPhaseCommit; base.enlistment.ProtocolProviderContext = this; base.stateMachine = new SubordinateStateMachine(this); base.stateMachine.ChangeState(state.States.SubordinateInitializing); }
public Configuration(ProtocolState state) { DebugTrace.TraceEnter(this, "Configuration"); this.state = state; this.overrideSection = this.GetOverrideSectionConfiguration(); using (ConfigurationProvider provider = this.GetConfigurationProvider()) { this.ReadDiagnosticTracingConfiguration(provider); this.ReadTimeoutConfiguration(provider); this.ReadTimerPolicyConfiguration(provider); this.ReadPortConfiguration(provider); } this.TraceConfiguration(); DebugTrace.TraceLeave(this, "Configuration"); }
public ParticipantEnlistment(ProtocolState state, WsatRegistrationHeader header, Microsoft.Transactions.Wsat.Messaging.ControlProtocol protocol, TwoPhaseCommitParticipantProxy proxy) : base(state) { this.protocol = protocol; proxy.AddRef(); this.participantProxy = proxy; this.ConfigureEnlistment(header); this.CreateCoordinatorService(); switch (protocol) { case Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Volatile2PC: base.stateMachine = new VolatileStateMachine(this); base.stateMachine.ChangeState(state.States.VolatileRegistering); return; case Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Durable2PC: base.stateMachine = new DurableStateMachine(this); base.stateMachine.ChangeState(state.States.DurableRegistering); return; } Microsoft.Transactions.Bridge.DiagnosticUtility.FailFast("Invalid protocol"); }
public CoordinatorEnlistment(ProtocolState state, Enlistment enlistment, Guid enlistmentId, EndpointAddress service) : base(state, enlistmentId) { base.enlistment = enlistment; base.enlistment.ProtocolProviderContext = this; this.recoveredCoordinatorService = service; base.stateMachine = new CoordinatorStateMachine(this); base.coordinatorProxy = state.TryCreateTwoPhaseCommitCoordinatorProxy(service); if (base.coordinatorProxy == null) { if (RecoveredCoordinatorInvalidMetadataRecord.ShouldTrace) { RecoveredCoordinatorInvalidMetadataRecord.Trace(base.enlistmentId, enlistment.RemoteTransactionId, service, base.state.ProtocolVersion); } base.stateMachine.ChangeState(state.States.CoordinatorFailedRecovery); } else { base.stateMachine.ChangeState(state.States.CoordinatorRecovering); } base.AddToLookupTable(); }
public ParticipantEnlistment(ProtocolState state, Enlistment enlistment, Guid enlistmentId, EndpointAddress service) : base(state, enlistmentId) { base.enlistment = enlistment; base.enlistment.ProtocolProviderContext = this; this.protocol = Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Durable2PC; base.stateMachine = new DurableStateMachine(this); this.participantProxy = state.TryCreateTwoPhaseCommitParticipantProxy(service); if (this.participantProxy == null) { if (RecoveredParticipantInvalidMetadataRecord.ShouldTrace) { RecoveredParticipantInvalidMetadataRecord.Trace(base.enlistmentId, enlistment.RemoteTransactionId, service, base.state.ProtocolVersion); } base.stateMachine.ChangeState(state.States.DurableFailedRecovery); } else { base.stateMachine.ChangeState(state.States.DurableRecovering); } base.AddToLookupTable(); }
public void Initialize(TransactionManager transactionManager) { DebugTrace.TraceEnter(this, "Initialize"); try { this.state = new ProtocolState(transactionManager, this.protocolVersion); this.protocolProviderState = ProtocolProviderState.Initialized; if (ProtocolInitializedRecord.ShouldTrace) { ProtocolInitializedRecord.Trace(this.protocolId, this.name); } } catch (Exception exception) { DebugTrace.Trace(TraceLevel.Error, "Could not initialize protocol: {0}", exception); ProtocolInitializationFailureRecord.TraceAndLog(this.protocolId, this.name, exception); throw; } finally { DebugTrace.TraceLeave(this, "Initialize"); } }
public CoordinatorVolatilePreparingRegistered(ProtocolState state) : base(state) { }
public CoordinatorRegisteringVolatile(ProtocolState state) : base(state) { }
public StateContainer(ProtocolState state) { this.coordinatorInitializing = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorInitializing(state); this.coordinatorEnlisting = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorEnlisting(state); this.coordinatorEnlisted = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorEnlisted(state); this.coordinatorRegisteringBoth = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorRegisteringBoth(state); this.coordinatorRegisteringDurable = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorRegisteringDurable(state); this.coordinatorRegisteringVolatile = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorRegisteringVolatile(state); this.coordinatorVolatileActive = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorVolatileActive(state); this.coordinatorVolatilePreparing = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorVolatilePreparing(state); this.coordinatorVolatilePreparingRegistering = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorVolatilePreparingRegistering(state); this.coordinatorVolatilePreparingRegistered = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorVolatilePreparingRegistered(state); this.coordinatorActive = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorActive(state); this.coordinatorPreparing = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorPreparing(state); this.coordinatorPrepared = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorPrepared(state); this.coordinatorCommitting = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorCommitting(state); this.coordinatorRecovering = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorRecovering(state); this.coordinatorRecovered = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorRecovered(state); this.coordinatorAwaitingEndOfRecovery = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorAwaitingEndOfRecovery(state); this.coordinatorFailedRecovery = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorFailedRecovery(state); this.coordinatorCommitted = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorCommitted(state); this.coordinatorAborted = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorAborted(state); this.coordinatorForgotten = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorForgotten(state); this.coordinatorReadOnlyInDoubt = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorReadOnlyInDoubt(state); this.coordinatorInitializationFailed = new Microsoft.Transactions.Wsat.StateMachines.CoordinatorInitializationFailed(state); this.completionInitializing = new Microsoft.Transactions.Wsat.StateMachines.CompletionInitializing(state); this.completionCreating = new Microsoft.Transactions.Wsat.StateMachines.CompletionCreating(state); this.completionCreated = new Microsoft.Transactions.Wsat.StateMachines.CompletionCreated(state); this.completionActive = new Microsoft.Transactions.Wsat.StateMachines.CompletionActive(state); this.completionCommitting = new Microsoft.Transactions.Wsat.StateMachines.CompletionCommitting(state); this.completionAborting = new Microsoft.Transactions.Wsat.StateMachines.CompletionAborting(state); this.completionCommitted = new Microsoft.Transactions.Wsat.StateMachines.CompletionCommitted(state); this.completionAborted = new Microsoft.Transactions.Wsat.StateMachines.CompletionAborted(state); this.completionInitializationFailed = new Microsoft.Transactions.Wsat.StateMachines.CompletionInitializationFailed(state); this.subordinateInitializing = new Microsoft.Transactions.Wsat.StateMachines.SubordinateInitializing(state); this.subordinateRegistering = new Microsoft.Transactions.Wsat.StateMachines.SubordinateRegistering(state); this.subordinateActive = new Microsoft.Transactions.Wsat.StateMachines.SubordinateActive(state); this.subordinateFinished = new Microsoft.Transactions.Wsat.StateMachines.SubordinateFinished(state); this.durableRegistering = new Microsoft.Transactions.Wsat.StateMachines.DurableRegistering(state); this.durableActive = new Microsoft.Transactions.Wsat.StateMachines.DurableActive(state); this.durableUnregistered = new Microsoft.Transactions.Wsat.StateMachines.DurableUnregistered(state); this.durablePreparing = new Microsoft.Transactions.Wsat.StateMachines.DurablePreparing(state); this.durablePrepared = new Microsoft.Transactions.Wsat.StateMachines.DurablePrepared(state); this.durableCommitting = new Microsoft.Transactions.Wsat.StateMachines.DurableCommitting(state); this.durableRecovering = new Microsoft.Transactions.Wsat.StateMachines.DurableRecovering(state); this.durableRejoined = new Microsoft.Transactions.Wsat.StateMachines.DurableRejoined(state); this.durableRecoveryAwaitingCommit = new Microsoft.Transactions.Wsat.StateMachines.DurableRecoveryAwaitingCommit(state); this.durableRecoveryReceivedCommit = new Microsoft.Transactions.Wsat.StateMachines.DurableRecoveryReceivedCommit(state); this.durableRecoveryAwaitingRollback = new Microsoft.Transactions.Wsat.StateMachines.DurableRecoveryAwaitingRollback(state); this.durableRecoveryReceivedRollback = new Microsoft.Transactions.Wsat.StateMachines.DurableRecoveryReceivedRollback(state); this.durableFailedRecovery = new Microsoft.Transactions.Wsat.StateMachines.DurableFailedRecovery(state); this.durableCommitted = new Microsoft.Transactions.Wsat.StateMachines.DurableCommitted(state); this.durableAborted = new Microsoft.Transactions.Wsat.StateMachines.DurableAborted(state); this.durableInDoubt = new Microsoft.Transactions.Wsat.StateMachines.DurableInDoubt(state); this.durableInitializationFailed = new Microsoft.Transactions.Wsat.StateMachines.DurableInitializationFailed(state); this.volatileRegistering = new Microsoft.Transactions.Wsat.StateMachines.VolatileRegistering(state); this.volatilePhaseZeroActive = new Microsoft.Transactions.Wsat.StateMachines.VolatilePhaseZeroActive(state); this.volatilePhaseZeroUnregistered = new Microsoft.Transactions.Wsat.StateMachines.VolatilePhaseZeroUnregistered(state); this.volatilePhaseOneUnregistered = new Microsoft.Transactions.Wsat.StateMachines.VolatilePhaseOneUnregistered(state); this.volatilePrePreparing = new Microsoft.Transactions.Wsat.StateMachines.VolatilePrePreparing(state); this.volatilePrePrepared = new Microsoft.Transactions.Wsat.StateMachines.VolatilePrePrepared(state); this.volatilePrepared = new Microsoft.Transactions.Wsat.StateMachines.VolatilePrepared(state); this.volatileCommitting = new Microsoft.Transactions.Wsat.StateMachines.VolatileCommitting(state); this.volatileAborting = new Microsoft.Transactions.Wsat.StateMachines.VolatileAborting(state); this.volatileCommitted = new Microsoft.Transactions.Wsat.StateMachines.VolatileCommitted(state); this.volatileAborted = new Microsoft.Transactions.Wsat.StateMachines.VolatileAborted(state); this.volatileInDoubt = new Microsoft.Transactions.Wsat.StateMachines.VolatileInDoubt(state); this.volatileInitializationFailed = new Microsoft.Transactions.Wsat.StateMachines.VolatileInitializationFailed(state); this.transactionContextInitializing = new Microsoft.Transactions.Wsat.StateMachines.TransactionContextInitializing(state); this.transactionContextInitializingCoordinator = new Microsoft.Transactions.Wsat.StateMachines.TransactionContextInitializingCoordinator(state); this.transactionContextActive = new Microsoft.Transactions.Wsat.StateMachines.TransactionContextActive(state); this.transactionContextFinished = new Microsoft.Transactions.Wsat.StateMachines.TransactionContextFinished(state); }
public CompletionCommitting(ProtocolState state) : base(state) { }
public CoordinatorInitializationFailed(ProtocolState state) : base(state) { }
public DurableRejoined(ProtocolState state) : base(state) { }
public DurableActive(ProtocolState state) : base(state) { }
public TransactionContextInitializing(ProtocolState state) : base(state) { }
protected TransactionEnlistment(ProtocolState state, Guid enlistmentId) { this.state = state; this.enlistmentId = enlistmentId; }
public CoordinatorAborted(ProtocolState state) : base(state) { }
protected ActiveState(ProtocolState state) : base(state) { }
public TimerManager(ProtocolState state) { this.state = state; this.timerList = new SortedList(this); this.timer = new Timer(Fx.ThunkCallback(new TimerCallback(this.OnTimer)), null, -1, -1); }
protected State(ProtocolState state) { this.state = state; }
public CompletionEnlistment(ProtocolState state) : base(state, Guid.Empty) { this.ConfigureEnlistment(); base.stateMachine = new CompletionStateMachine(this); base.stateMachine.ChangeState(state.States.CompletionInitializing); }
public DurablePrepared(ProtocolState state) : base(state) { }
public RegistrationParticipant(ProtocolState state) { this.state = state; this.sendDurableRegisterComplete = Fx.ThunkCallback(new AsyncCallback(this.OnSendDurableRegisterComplete)); this.sendVolatileRegisterComplete = Fx.ThunkCallback(new AsyncCallback(this.OnSendVolatileRegisterComplete)); }
public SubordinateInitializing(ProtocolState state) : base(state) { }
protected CoordinatorEnlistmentBase(ProtocolState state, Guid enlistmentId) : base(state, enlistmentId) { }
public CoordinatorEnlisting(ProtocolState state) : base(state) { }
public ProtocolInformationWriter(ProtocolState state) { this.state = state; }
public FaultSender(ProtocolState state) { this.state = state; this.sendFaultComplete = Fx.ThunkCallback(new AsyncCallback(this.SendFaultComplete)); }
protected TransactionEnlistment(ProtocolState state) : this(state, Guid.NewGuid()) { }
protected CoordinatorEnlistmentBase(ProtocolState state) : base(state) { }
public CompletionAborting(ProtocolState state) : base(state) { }
public VolatileRegistering(ProtocolState state) : base(state) { }
protected SynchronizationEvent(TransactionEnlistment enlistment) { this.enlistment = enlistment; this.state = enlistment.State; }
public CoordinatorForgotten(ProtocolState state) : base(state) { }
public LookupTables(ProtocolState state) { this.state = state; }