public class PhiAccrualClusterFailureDetector extends Object implements ClusterFailureDetector
PhiAccrualFailureDetector
Modifier and Type | Field and Description |
---|---|
static HazelcastProperty |
HEARTBEAT_PHI_FAILURE_DETECTOR_MIN_STD_DEV_MILLIS
Minimum standard deviation to use for the normal distribution used when calculating phi.
|
static HazelcastProperty |
HEARTBEAT_PHI_FAILURE_DETECTOR_SAMPLE_SIZE
Number of samples to use for calculations.
|
static HazelcastProperty |
HEARTBEAT_PHI_FAILURE_DETECTOR_THRESHOLD
Threshold for suspicion level.
|
Constructor and Description |
---|
PhiAccrualClusterFailureDetector(long maxNoHeartbeatMillis,
long heartbeatIntervalMillis,
double phiThreshold,
int maxSampleSize,
long minStdDeviationMillis) |
PhiAccrualClusterFailureDetector(long maxNoHeartbeatMillis,
long heartbeatIntervalMillis,
HazelcastProperties props) |
Modifier and Type | Method and Description |
---|---|
void |
heartbeat(Member member,
long timestamp)
Notifies this failure detector about received heartbeat message from a member.
|
boolean |
isAlive(Member member,
long timestamp)
Returns true if given member is considered as alive/available.
|
long |
lastHeartbeat(Member member)
Returns the last heartbeat timestamp for a member.
|
void |
remove(Member member)
Deregister member from tracking and cleanup resources related to this member.
|
void |
reset()
Clear all state kept by this failure detector
|
double |
suspicionLevel(Member member,
long timestamp)
Returns suspicion level about a given member.
|
public static final HazelcastProperty HEARTBEAT_PHI_FAILURE_DETECTOR_THRESHOLD
public static final HazelcastProperty HEARTBEAT_PHI_FAILURE_DETECTOR_SAMPLE_SIZE
public static final HazelcastProperty HEARTBEAT_PHI_FAILURE_DETECTOR_MIN_STD_DEV_MILLIS
public PhiAccrualClusterFailureDetector(long maxNoHeartbeatMillis, long heartbeatIntervalMillis, HazelcastProperties props)
public PhiAccrualClusterFailureDetector(long maxNoHeartbeatMillis, long heartbeatIntervalMillis, double phiThreshold, int maxSampleSize, long minStdDeviationMillis)
public void heartbeat(Member member, long timestamp)
ClusterFailureDetector
heartbeat
in interface ClusterFailureDetector
member
- member which heartbeat message is received fromtimestamp
- timestamp of heartbeat message in millisecondspublic boolean isAlive(Member member, long timestamp)
ClusterFailureDetector
isAlive
in interface ClusterFailureDetector
member
- member whose liveness is questionedtimestamp
- timestamp in millisecondspublic long lastHeartbeat(Member member)
ClusterFailureDetector
lastHeartbeat
in interface ClusterFailureDetector
member
- member whose heartbeat timestamp is requestedpublic double suspicionLevel(Member member, long timestamp)
ClusterFailureDetector
0
indicates no suspicion at all.suspicionLevel
in interface ClusterFailureDetector
member
- membertimestamp
- timestamp in millisecondspublic void remove(Member member)
ClusterFailureDetector
remove
in interface ClusterFailureDetector
member
- member to be removedpublic void reset()
ClusterFailureDetector
reset
in interface ClusterFailureDetector
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.