public class ProbabilisticSplitBrainProtectionFunction extends AbstractPingAwareSplitBrainProtectionFunction implements HeartbeatAware, SplitBrainProtectionFunction, MembershipListener
Constructor and Description |
---|
ProbabilisticSplitBrainProtectionFunction(int minimumClusterSize,
long heartbeatIntervalMillis,
long acceptableHeartbeatPauseMillis,
int maxSampleSize,
long minStdDeviationMillis,
double suspicionThreshold) |
Modifier and Type | Method and Description |
---|---|
boolean |
apply(Collection<Member> members)
Determines whether the minimum cluster size property is satisfied based on the current list of members
in the cluster.
|
boolean |
equals(Object o) |
long |
getAcceptableHeartbeatPauseMillis() |
long |
getHeartbeatIntervalMillis() |
int |
getMaxSampleSize() |
long |
getMinStdDeviationMillis() |
double |
getSuspicionThreshold() |
int |
hashCode() |
void |
memberRemoved(MembershipEvent membershipEvent)
Invoked when an existing member leaves the cluster.
|
void |
onHeartbeat(Member member,
long timestamp)
Notifies of a received heartbeat.
|
isAlivePerIcmp, memberAdded, memberAttributeChanged, onPingLost, onPingRestored, setHazelcastInstance
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
memberAdded, memberAttributeChanged
public ProbabilisticSplitBrainProtectionFunction(int minimumClusterSize, long heartbeatIntervalMillis, long acceptableHeartbeatPauseMillis, int maxSampleSize, long minStdDeviationMillis, double suspicionThreshold)
public boolean apply(Collection<Member> members)
SplitBrainProtectionFunction
apply
in interface SplitBrainProtectionFunction
members
- snapshot of current member listpublic void memberRemoved(MembershipEvent membershipEvent)
MembershipListener
memberRemoved
in interface MembershipListener
memberRemoved
in class AbstractPingAwareSplitBrainProtectionFunction
membershipEvent
- membership event when an existing member leaves the clusterpublic void onHeartbeat(Member member, long timestamp)
HeartbeatAware
SplitBrainProtectionFunction.apply(Collection)
so the SplitBrainProtectionFunction
can update
its internal state before deciding on whether the minimum cluster size property
(for the purpose of split brain detection) is satisfied.onHeartbeat
in interface HeartbeatAware
member
- member from which heartbeat was receivedtimestamp
- timestmap on which heartbeat was receivedpublic double getSuspicionThreshold()
public int getMaxSampleSize()
public long getMinStdDeviationMillis()
public long getAcceptableHeartbeatPauseMillis()
public long getHeartbeatIntervalMillis()
Copyright © 2019 Hazelcast, Inc.. All rights reserved.