Class ProbabilisticSplitBrainProtectionConfigBuilder

java.lang.Object
com.hazelcast.config.SplitBrainProtectionConfigBuilder
com.hazelcast.config.ProbabilisticSplitBrainProtectionConfigBuilder

public class ProbabilisticSplitBrainProtectionConfigBuilder extends SplitBrainProtectionConfigBuilder
Builder for a SplitBrainProtectionConfig configured with ProbabilisticSplitBrainProtectionFunction that considers members present in the context of a split brain protection using a probabilistic, adaptive split brain protection function.
  • Field Details

    • 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 Details

    • withSuspicionThreshold

      public ProbabilisticSplitBrainProtectionConfigBuilder 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 ProbabilisticSplitBrainProtectionConfigBuilder withMaxSampleSize(int maxSampleSize)
      Number of samples to use for calculation of mean and standard deviation of inter-arrival times.
    • withMinStdDeviationMillis

      public ProbabilisticSplitBrainProtectionConfigBuilder 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 ProbabilisticSplitBrainProtectionConfigBuilder 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 ProbabilisticSplitBrainProtectionConfigBuilder 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

      Specified by:
      build in class SplitBrainProtectionConfigBuilder