com.hazelcast.config.cp

## 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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `DEFAULT_APPEND_REQUEST_BACKOFF_TIMEOUT_IN_MILLIS` Default append request backoff timeout in millis.
    `static int` | `DEFAULT_APPEND_REQUEST_MAX_ENTRY_COUNT` Default max append request entry count.
    `static int` | `DEFAULT_COMMIT_INDEX_ADVANCE_COUNT_TO_SNAPSHOT` Default commit index advance to initiate a snapshot.
    `static long` | `DEFAULT_LEADER_ELECTION_TIMEOUT_IN_MILLIS` Default leader election timeout in millis.
    `static long` | `DEFAULT_LEADER_HEARTBEAT_PERIOD_IN_MILLIS` Default leader heartbeat period in millis.
    `static int` | `DEFAULT_MAX_MISSED_LEADER_HEARTBEAT_COUNT` Default max number of missed heartbeats to trigger a new leader election.
    `static int` | `DEFAULT_UNCOMMITTED_ENTRY_COUNT_TO_REJECT_NEW_APPENDS` Default max allowed uncommitted entry count.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RaftAlgorithmConfig()`
    `RaftAlgorithmConfig(RaftAlgorithmConfig config)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getAppendRequestBackoffTimeoutInMillis()`
    `int` | `getAppendRequestMaxEntryCount()`
    `int` | `getCommitIndexAdvanceCountToSnapshot()`
    `long` | `getLeaderElectionTimeoutInMillis()`
    `long` | `getLeaderHeartbeatPeriodInMillis()`
    `int` | `getMaxMissedLeaderHeartbeatCount()`
    `int` | `getUncommittedEntryCountToRejectNewAppends()`
    `RaftAlgorithmConfig` | `setAppendRequestBackoffTimeoutInMillis(long appendRequestBackoffTimeoutInMillis)`
    `RaftAlgorithmConfig` | `setAppendRequestMaxEntryCount(int appendRequestMaxEntryCount)`
    `RaftAlgorithmConfig` | `setCommitIndexAdvanceCountToSnapshot(int commitIndexAdvanceCountToSnapshot)`
    `RaftAlgorithmConfig` | `setLeaderElectionTimeoutInMillis(long leaderElectionTimeoutInMillis)`
    `RaftAlgorithmConfig` | `setLeaderHeartbeatPeriodInMillis(long leaderHeartbeatPeriodInMillis)`
    `RaftAlgorithmConfig` | `setMaxMissedLeaderHeartbeatCount(int maxMissedLeaderHeartbeatCount)`
    `RaftAlgorithmConfig` | `setUncommittedEntryCountToRejectNewAppends(int uncommittedEntryCountToRejectNewAppends)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_LEADER_ELECTION_TIMEOUT_IN_MILLIS

          public static final long DEFAULT_LEADER_ELECTION_TIMEOUT_IN_MILLIS

      Default leader election timeout in millis. See `leaderElectionTimeoutInMillis`.
      See Also:
        Constant Field Values

    - #### DEFAULT_LEADER_HEARTBEAT_PERIOD_IN_MILLIS

          public static final long DEFAULT_LEADER_HEARTBEAT_PERIOD_IN_MILLIS

      Default leader heartbeat period in millis. See `leaderHeartbeatPeriodInMillis`.
      See Also:
        Constant Field Values

    - #### DEFAULT_APPEND_REQUEST_MAX_ENTRY_COUNT

          public static final int DEFAULT_APPEND_REQUEST_MAX_ENTRY_COUNT

      Default max append request entry count. See `appendRequestMaxEntryCount`.
      See Also:
        Constant Field Values

    - #### DEFAULT_COMMIT_INDEX_ADVANCE_COUNT_TO_SNAPSHOT

          public static final int DEFAULT_COMMIT_INDEX_ADVANCE_COUNT_TO_SNAPSHOT

      Default commit index advance to initiate a snapshot. See `commitIndexAdvanceCountToSnapshot`.
      See Also:
        Constant Field Values

    - #### DEFAULT_UNCOMMITTED_ENTRY_COUNT_TO_REJECT_NEW_APPENDS

          public static final int DEFAULT_UNCOMMITTED_ENTRY_COUNT_TO_REJECT_NEW_APPENDS

      Default max allowed uncommitted entry count. See `uncommittedEntryCountToRejectNewAppends`.
      See Also:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

  - ### Constructor Detail

    - #### RaftAlgorithmConfig

          public RaftAlgorithmConfig()

    - #### RaftAlgorithmConfig

          public RaftAlgorithmConfig(RaftAlgorithmConfig config)

  - ### Method Detail

    - #### 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)

Copyright © 2019. All rights reserved.