Package io.microraft
Class RaftConfig.RaftConfigBuilder
java.lang.Object
io.microraft.RaftConfig.RaftConfigBuilder
- Enclosing class:
- RaftConfig
Builder for Raft config
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the RaftConfig object.setAppendEntriesRequestBatchSize
(int appendEntriesRequestBatchSize) setCommitCountToTakeSnapshot
(int commitCountToTakeSnapshot) setLeaderElectionTimeoutMillis
(long leaderElectionTimeoutMillis) setLeaderHeartbeatPeriodSecs
(long leaderHeartbeatPeriodSecs) setLeaderHeartbeatTimeoutSecs
(long leaderHeartbeatTimeoutSecs) setMaxPendingLogEntryCount
(int maxPendingLogEntryCount) setRaftNodeReportPublishPeriodSecs
(int raftNodeReportPublishPeriodSecs) setTransferSnapshotsFromFollowersEnabled
(boolean transferSnapshotsFromFollowersEnabled) toString()
-
Method Details
-
setLeaderElectionTimeoutMillis
public RaftConfig.RaftConfigBuilder setLeaderElectionTimeoutMillis(long leaderElectionTimeoutMillis) - Parameters:
leaderElectionTimeoutMillis
- the leader election timeout in milliseconds value to set- Returns:
- the builder object for fluent calls
- See Also:
-
RaftConfig.leaderElectionTimeoutMillis
-
setLeaderHeartbeatTimeoutSecs
- Parameters:
leaderHeartbeatTimeoutSecs
- the leader heartbeat timeout in seconds value to set- Returns:
- the builder object for fluent calls
- See Also:
-
RaftConfig.leaderHeartbeatTimeoutSecs
-
setLeaderHeartbeatPeriodSecs
- Parameters:
leaderHeartbeatPeriodSecs
- the leader heartbeat period in seconds value to set- Returns:
- the builder object for fluent calls
- See Also:
-
RaftConfig.leaderHeartbeatPeriodSecs
-
setAppendEntriesRequestBatchSize
public RaftConfig.RaftConfigBuilder setAppendEntriesRequestBatchSize(int appendEntriesRequestBatchSize) - Parameters:
appendEntriesRequestBatchSize
- the append entries request batch size value to set- Returns:
- the builder object for fluent calls
- See Also:
-
RaftConfig.appendEntriesRequestBatchSize
-
setCommitCountToTakeSnapshot
- Parameters:
commitCountToTakeSnapshot
- the commit count to take snapshot value to set- Returns:
- the builder object for fluent calls
- See Also:
-
RaftConfig.commitCountToTakeSnapshot
-
setMaxPendingLogEntryCount
- Parameters:
maxPendingLogEntryCount
- the max pending log entry count value to set- Returns:
- the builder object for fluent calls
- See Also:
-
RaftConfig.maxPendingLogEntryCount
-
setTransferSnapshotsFromFollowersEnabled
public RaftConfig.RaftConfigBuilder setTransferSnapshotsFromFollowersEnabled(boolean transferSnapshotsFromFollowersEnabled) - Parameters:
transferSnapshotsFromFollowersEnabled
- the transfer snapshot from followers value to set- Returns:
- the builder object for fluent calls
- See Also:
-
transferSnapshotsFromFollowersEnabled
-
setRaftNodeReportPublishPeriodSecs
public RaftConfig.RaftConfigBuilder setRaftNodeReportPublishPeriodSecs(int raftNodeReportPublishPeriodSecs) - Parameters:
raftNodeReportPublishPeriodSecs
- the raft node report publish period value to set- Returns:
- the builder object for fluent calls
- See Also:
-
raftNodeReportPublishPeriodSecs
-
build
Builds the RaftConfig object.- Returns:
- the RaftConfig object.
-
toString
-