Ejemplo n.º 1
0
 public CandidateRole(
     IRoleCoordinator <TOperation> local,
     ILogger logger,
     IPersistentLog <TOperation> journal,
     IRaftPersistentState persistentState,
     IRaftVolatileState volatileState,
     IRandom random,
     IGrainFactory grainFactory,
     RegisterTimerDelegate registerTimer,
     IServerIdentity identity,
     IMembershipProvider membershipProvider,
     ISettings settings)
 {
     this.local              = local;
     this.logger             = logger;
     this.journal            = journal;
     this.persistentState    = persistentState;
     this.volatileState      = volatileState;
     this.random             = random;
     this.grainFactory       = grainFactory;
     this.registerTimer      = registerTimer;
     this.identity           = identity;
     this.membershipProvider = membershipProvider;
     this.settings           = settings;
 }
Ejemplo n.º 2
0
 public LeaderRole(
     IRoleCoordinator <TOperation> coordinator,
     ILogger logger,
     IPersistentLog <TOperation> journal,
     IStateMachine <TOperation> stateMachine,
     IRaftPersistentState persistentState,
     IRaftVolatileState volatileState,
     IGrainFactory grainFactory,
     RegisterTimerDelegate registerTimer,
     IServerIdentity identity,
     IMembershipProvider membershipProvider,
     ISettings settings)
 {
     this.coordinator        = coordinator;
     this.logger             = logger;
     this.journal            = journal;
     this.stateMachine       = stateMachine;
     this.persistentState    = persistentState;
     this.volatileState      = volatileState;
     this.grainFactory       = grainFactory;
     this.registerTimer      = registerTimer;
     this.identity           = identity;
     this.membershipProvider = membershipProvider;
     this.settings           = settings;
     this.heartbeatTimeout   = TimeSpan.FromMilliseconds(this.settings.HeartbeatTimeoutMilliseconds);
 }
Ejemplo n.º 3
0
 public FollowerRole(
     ILogger logger,
     IRoleCoordinator <TOperation> coordinator,
     IPersistentLog <TOperation> journal,
     IStateMachine <TOperation> stateMachine,
     IRaftPersistentState persistentState,
     IRaftVolatileState volatileState,
     IRandom random,
     RegisterTimerDelegate registerTimer,
     ISettings settings)
 {
     this.logger          = logger;
     this.coordinator     = coordinator;
     this.journal         = journal;
     this.stateMachine    = stateMachine;
     this.persistentState = persistentState;
     this.volatileState   = volatileState;
     this.random          = random;
     this.registerTimer   = registerTimer;
     this.settings        = settings;
 }