Class RaftAlgorithmConfig

java.lang.Object
com.hazelcast.config.cp.RaftAlgorithmConfig

public class RaftAlgorithmConfig extends Object
Configuration for Hazelcast's implementation of the Raft consensus algorithm
  • Field Details

    • DEFAULT_LEADER_ELECTION_TIMEOUT_IN_MILLIS

      public static final long DEFAULT_LEADER_ELECTION_TIMEOUT_IN_MILLIS
      The default leader election timeout in millis. See leaderElectionTimeoutInMillis.
      See Also:
    • DEFAULT_LEADER_HEARTBEAT_PERIOD_IN_MILLIS

      public static final long DEFAULT_LEADER_HEARTBEAT_PERIOD_IN_MILLIS
      The default leader heartbeat period in millis. See leaderHeartbeatPeriodInMillis.
      See Also:
    • DEFAULT_APPEND_REQUEST_MAX_ENTRY_COUNT

      public static final int DEFAULT_APPEND_REQUEST_MAX_ENTRY_COUNT
      The default maximum append request entry count. See appendRequestMaxEntryCount.
      See Also:
    • DEFAULT_COMMIT_INDEX_ADVANCE_COUNT_TO_SNAPSHOT

      public static final int DEFAULT_COMMIT_INDEX_ADVANCE_COUNT_TO_SNAPSHOT
      The default commit index advance count on Raft log to take a snapshot. See commitIndexAdvanceCountToSnapshot.
      See Also:
    • DEFAULT_UNCOMMITTED_ENTRY_COUNT_TO_REJECT_NEW_APPENDS

      public static final int DEFAULT_UNCOMMITTED_ENTRY_COUNT_TO_REJECT_NEW_APPENDS
      The default maximum allowed uncommitted entry count. See uncommittedEntryCountToRejectNewAppends.
      See Also:
    • DEFAULT_MAX_MISSED_LEADER_HEARTBEAT_COUNT

      public static final int DEFAULT_MAX_MISSED_LEADER_HEARTBEAT_COUNT
      Default max number of missed heartbeats to trigger a new leader election.
      See Also:
    • DEFAULT_APPEND_REQUEST_BACKOFF_TIMEOUT_IN_MILLIS

      public static final long DEFAULT_APPEND_REQUEST_BACKOFF_TIMEOUT_IN_MILLIS
      Default append request backoff timeout in millis.
      See Also:
  • Constructor Details

    • RaftAlgorithmConfig

      public RaftAlgorithmConfig()
    • RaftAlgorithmConfig

      public RaftAlgorithmConfig(RaftAlgorithmConfig config)
  • Method Details

    • getLeaderElectionTimeoutInMillis

      public long getLeaderElectionTimeoutInMillis()
    • setLeaderElectionTimeoutInMillis

      public RaftAlgorithmConfig setLeaderElectionTimeoutInMillis(long leaderElectionTimeoutInMillis)
    • getLeaderHeartbeatPeriodInMillis

      public long getLeaderHeartbeatPeriodInMillis()
    • setLeaderHeartbeatPeriodInMillis

      public RaftAlgorithmConfig setLeaderHeartbeatPeriodInMillis(long leaderHeartbeatPeriodInMillis)
    • getAppendRequestMaxEntryCount

      public int getAppendRequestMaxEntryCount()
    • setAppendRequestMaxEntryCount

      public RaftAlgorithmConfig setAppendRequestMaxEntryCount(int appendRequestMaxEntryCount)
    • getCommitIndexAdvanceCountToSnapshot

      public int getCommitIndexAdvanceCountToSnapshot()
    • setCommitIndexAdvanceCountToSnapshot

      public RaftAlgorithmConfig setCommitIndexAdvanceCountToSnapshot(int commitIndexAdvanceCountToSnapshot)
    • getUncommittedEntryCountToRejectNewAppends

      public int getUncommittedEntryCountToRejectNewAppends()
    • setUncommittedEntryCountToRejectNewAppends

      public RaftAlgorithmConfig setUncommittedEntryCountToRejectNewAppends(int uncommittedEntryCountToRejectNewAppends)
    • getMaxMissedLeaderHeartbeatCount

      public int getMaxMissedLeaderHeartbeatCount()
    • setMaxMissedLeaderHeartbeatCount

      public RaftAlgorithmConfig setMaxMissedLeaderHeartbeatCount(int maxMissedLeaderHeartbeatCount)
    • getAppendRequestBackoffTimeoutInMillis

      public long getAppendRequestBackoffTimeoutInMillis()
    • setAppendRequestBackoffTimeoutInMillis

      public RaftAlgorithmConfig setAppendRequestBackoffTimeoutInMillis(long appendRequestBackoffTimeoutInMillis)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object