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