Package com.hazelcast.config
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 Summary
Modifier and TypeFieldDescriptionstatic final long
Default value of heartbeat interval (in milliseconds).static final long
Default duration in milliseconds corresponding to number of potentially lost/delayed heartbeats that will be accepted before considering it to be an anomaly.static final long
Default minimum standard deviation (in milliseconds) to use for the normal distribution used when calculating phi.static final double
Default threshold for suspicion (φ) level.static final int
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
Modifier and TypeMethodDescriptionbuild()
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.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).withMaxSampleSize
(int maxSampleSize) Number of samples to use for calculation of mean and standard deviation of inter-arrival times.withMinStdDeviationMillis
(long minStdDeviationMillis) Minimum standard deviation (in milliseconds) to use for the normal distribution used when calculating phi.withSuspicionThreshold
(double suspicionThreshold) Threshold for suspicion (φ) level.Methods inherited from class com.hazelcast.config.SplitBrainProtectionConfigBuilder
enabled, withSplitBrainProtectionSize
-
Field Details
-
DEFAULT_PHI_THRESHOLD
public static final double DEFAULT_PHI_THRESHOLDDefault threshold for suspicion (φ) level. -
DEFAULT_SAMPLE_SIZE
public static final int DEFAULT_SAMPLE_SIZEDefault 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_DEVIATIONDefault 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_MILLISDefault 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_MILLISDefault 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
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 classSplitBrainProtectionConfigBuilder
-