public class RecentlyActiveSplitBrainProtectionFunction extends AbstractPingAwareSplitBrainProtectionFunction implements HeartbeatAware, SplitBrainProtectionFunction, MembershipListener
heartbeatToleranceMillis milliseconds before current time.| Constructor and Description |
|---|
RecentlyActiveSplitBrainProtectionFunction(int minimumClusterSize,
int heartbeatToleranceMillis) |
| 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) |
int |
getHeartbeatToleranceMillis() |
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, setHazelcastInstanceclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitmemberAdded, memberAttributeChangedpublic RecentlyActiveSplitBrainProtectionFunction(int minimumClusterSize,
int heartbeatToleranceMillis)
public boolean apply(Collection<Member> members)
SplitBrainProtectionFunctionapply in interface SplitBrainProtectionFunctionmembers - snapshot of current member listpublic void onHeartbeat(Member member, long timestamp)
HeartbeatAwareSplitBrainProtectionFunction.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 HeartbeatAwaremember - member from which heartbeat was receivedtimestamp - timestmap on which heartbeat was receivedpublic void memberRemoved(MembershipEvent membershipEvent)
MembershipListenermemberRemoved in interface MembershipListenermemberRemoved in class AbstractPingAwareSplitBrainProtectionFunctionmembershipEvent - membership event when an existing member leaves the clusterpublic int getHeartbeatToleranceMillis()
Copyright © 2019 Hazelcast, Inc.. All rights reserved.