Package com.hazelcast.config
Class ProbabilisticSplitBrainProtectionConfigBuilder
- java.lang.Object
-
- com.hazelcast.config.SplitBrainProtectionConfigBuilder
-
- com.hazelcast.config.ProbabilisticSplitBrainProtectionConfigBuilder
-
public class ProbabilisticSplitBrainProtectionConfigBuilder extends SplitBrainProtectionConfigBuilder
Builder for aSplitBrainProtectionConfig
configured withProbabilisticSplitBrainProtectionFunction
that considers members present in the context of a split brain protection using a probabilistic, adaptive split brain protection function.
-
-
Field Summary
Fields Modifier and Type Field 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.SplitBrainProtectionConfigBuilder
enabled, minimumClusterSize
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SplitBrainProtectionConfig
build()
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.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).ProbabilisticSplitBrainProtectionConfigBuilder
withMaxSampleSize(int maxSampleSize)
Number of samples to use for calculation of mean and standard deviation of inter-arrival times.ProbabilisticSplitBrainProtectionConfigBuilder
withMinStdDeviationMillis(long minStdDeviationMillis)
Minimum standard deviation (in milliseconds) to use for the normal distribution used when calculating phi.ProbabilisticSplitBrainProtectionConfigBuilder
withSuspicionThreshold(double suspicionThreshold)
Threshold for suspicion (φ) level.-
Methods inherited from class com.hazelcast.config.SplitBrainProtectionConfigBuilder
enabled, withSplitBrainProtectionSize
-
-
-
-
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 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
public SplitBrainProtectionConfig build()
- Specified by:
build
in classSplitBrainProtectionConfigBuilder
-
-