示例#1
0
            internal LeaderIdReusabilityCondition(CommandIndexTracker commandIndexTracker, RaftMachine raftMachine)
            {
                this.CommandIndexTracker = commandIndexTracker;

                // Get highest command id seen
                this.CommandIdWhenBecameLeader = raftMachine.State().lastLogIndexBeforeWeBecameLeader();
            }
示例#2
0
 public IdReusabilityCondition(CommandIndexTracker commandIndexTracker, RaftMachine raftMachine, MemberId myself)
 {
     this._commandIndexTracker = commandIndexTracker;
     this._raftMachine         = raftMachine;
     this._myself = myself;
     raftMachine.RegisterListener(this);
 }