com.hazelcast.config

## Class ProbabilisticQuorumConfigBuilder

- java.lang.Object
- - com.hazelcast.config.QuorumConfigBuilder
  - - com.hazelcast.config.ProbabilisticQuorumConfigBuilder

-     public class ProbabilisticQuorumConfigBuilder
      extends QuorumConfigBuilder

  Builder for a `QuorumConfig` configured with `ProbabilisticQuorumFunction` that considers members present in the context of a quorum using a probabilistic, adaptive quorum function.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `DEFAULT_HEARTBEAT_INTERVAL_MILLIS` Default value of heartbeat interval (in milliseconds).
    `static long` | `DEFAULT_HEARTBEAT_PAUSE_MILLIS` Default duration in milliseconds corresponding to number of potentially lost/delayed heartbeats that will be accepted before considering it to be an anomaly.
    `static long` | `DEFAULT_MIN_STD_DEVIATION` Default minimum standard deviation (in milliseconds) to use for the normal distribution used when calculating phi.
    `static double` | `DEFAULT_PHI_THRESHOLD` Default threshold for suspicion (φ) level.
    `static int` | `DEFAULT_SAMPLE_SIZE` Default number of samples to use for calculation of mean and standard deviation of inter-arrival times.

    - ### Fields inherited from class com.hazelcast.config.QuorumConfigBuilder

      `enabled, size`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `QuorumConfig` | `build()`
    `ProbabilisticQuorumConfigBuilder` | `withAcceptableHeartbeatPauseMillis(long acceptableHeartbeatPauseMillis)` Duration in milliseconds corresponding to number of potentially lost/delayed heartbeats that will be accepted before considering it to be an anomaly.
    `ProbabilisticQuorumConfigBuilder` | `withHeartbeatIntervalMillis(long heartbeatIntervalMillis)` Bootstrap the stats with heartbeats that corresponds to this duration in milliseconds, with a rather high standard deviation (since environment is unknown in the beginning).
    `ProbabilisticQuorumConfigBuilder` | `withMaxSampleSize(int maxSampleSize)` Number of samples to use for calculation of mean and standard deviation of inter-arrival times.
    `ProbabilisticQuorumConfigBuilder` | `withMinStdDeviationMillis(long minStdDeviationMillis)` Minimum standard deviation (in milliseconds) to use for the normal distribution used when calculating phi.
    `ProbabilisticQuorumConfigBuilder` | `withSuspicionThreshold(double suspicionThreshold)` Threshold for suspicion (φ) level.

    - ### Methods inherited from class com.hazelcast.config.QuorumConfigBuilder

      `enabled, withQuorumSize`

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

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

- - ### Field Detail

    - #### DEFAULT_PHI_THRESHOLD

          public static final double DEFAULT_PHI_THRESHOLD

      Default threshold for suspicion (φ) level.

    - #### DEFAULT_SAMPLE_SIZE

          public static final int DEFAULT_SAMPLE_SIZE

      Default number of samples to use for calculation of mean and standard deviation of inter-arrival times.

    - #### DEFAULT_MIN_STD_DEVIATION

          public static final long DEFAULT_MIN_STD_DEVIATION

      Default minimum standard deviation (in milliseconds) to use for the normal distribution used when calculating phi.

    - #### DEFAULT_HEARTBEAT_PAUSE_MILLIS

          public static final long DEFAULT_HEARTBEAT_PAUSE_MILLIS

      Default duration in milliseconds corresponding to number of potentially lost/delayed heartbeats that will be accepted before considering it to be an anomaly.

    - #### DEFAULT_HEARTBEAT_INTERVAL_MILLIS

          public static final long DEFAULT_HEARTBEAT_INTERVAL_MILLIS

      Default value of heartbeat interval (in milliseconds).

  - ### Method Detail

    - #### withSuspicionThreshold

          public ProbabilisticQuorumConfigBuilder withSuspicionThreshold(double suspicionThreshold)

      Threshold for suspicion (φ) level. A low threshold is prone to generate many wrong suspicions but ensures a quick detection in the event of a real crash. Conversely, a high threshold generates fewer mistakes but needs more time to detect actual crashes.

    - #### withMaxSampleSize

          public ProbabilisticQuorumConfigBuilder withMaxSampleSize(int maxSampleSize)

      Number of samples to use for calculation of mean and standard deviation of inter-arrival times.

    - #### withMinStdDeviationMillis

          public ProbabilisticQuorumConfigBuilder withMinStdDeviationMillis(long minStdDeviationMillis)

      Minimum standard deviation (in milliseconds) to use for the normal distribution used when calculating phi. Too low standard deviation might result in too much sensitivity for sudden, but normal, deviations in heartbeat inter arrival times.

    - #### withAcceptableHeartbeatPauseMillis

          public ProbabilisticQuorumConfigBuilder withAcceptableHeartbeatPauseMillis(long acceptableHeartbeatPauseMillis)

      Duration in milliseconds corresponding to number of potentially lost/delayed heartbeats that will be accepted before considering it to be an anomaly. This margin is important to be able to survive sudden, occasional, pauses in heartbeat arrivals, due to for example garbage collection or network drops.

    - #### withHeartbeatIntervalMillis

          public ProbabilisticQuorumConfigBuilder withHeartbeatIntervalMillis(long heartbeatIntervalMillis)

      Bootstrap the stats with heartbeats that corresponds to this duration in milliseconds, with a rather high standard deviation (since environment is unknown in the beginning).

    - #### build

          public QuorumConfig build()

      Specified by:
        `build` in class `QuorumConfigBuilder`

Copyright © 2019. All rights reserved.