public RaftState(MemberId myself, StateStorage <TermState> termStorage, RaftMembership membership, RaftLog entryLog, StateStorage <VoteState> voteStorage, InFlightCache inFlightCache, LogProvider logProvider, bool supportPreVoting, bool refuseToBeLeader) { this._myself = myself; this._termStorage = termStorage; this._voteStorage = voteStorage; this._membership = membership; this._entryLog = entryLog; this._inFlightCache = inFlightCache; this._supportPreVoting = supportPreVoting; this._log = logProvider.getLog(this.GetType()); // Initial state this._isPreElection = supportPreVoting; this._refuseToBeLeader = refuseToBeLeader; }
public RaftLogShippingManager(Outbound <MemberId, Org.Neo4j.causalclustering.core.consensus.RaftMessages_RaftMessage> outbound, LogProvider logProvider, ReadableRaftLog raftLog, TimerService timerService, Clock clock, MemberId myself, RaftMembership membership, long retryTimeMillis, int catchupBatchSize, int maxAllowedShippingLag, InFlightCache inFlightCache) { this._outbound = outbound; this._logProvider = logProvider; this._raftLog = raftLog; this._timerService = timerService; this._clock = clock; this._myself = myself; this._membership = membership; this._retryTimeMillis = retryTimeMillis; this._catchupBatchSize = catchupBatchSize; this._maxAllowedShippingLag = maxAllowedShippingLag; this._inFlightCache = inFlightCache; membership.RegisterListener(this); }