聊聊hazelcast的PhiAccrualFailureDetector
序本文主要研究一下hazelcast的PhiAccrualFailureDetector FailureDetectorhazelcast-3.12-sources.jar!/com/hazelcast/internal/cluster/fd/FailureDetector.java /** * Failure detector tracks heartbeats of a member and decides liveness/availability of the member. */public interface FailureDetector { /** * Notifies this failure detector about received heartbeat message from the tracked member. * * @param timestamp timestamp of heartbeat message in milliseconds */ void heartbeat(long timestamp); /** * Returns true if the tracked member is considered as alive/available. * @param timestamp timestamp in milliseconds * @return true if the member is alive */ boolean isAlive(long timestamp); /** * Returns the last heartbeat timestamp for the tracked member. * @return heartbeat timestamp in milliseconds */ long lastHeartbeat(); /** * Returns suspicion level about the tracked member. Returned value is mostly implementation dependent. * <code>0</code> indicates no suspicion at all. * @param timestamp timestamp in milliseconds * @return suspicion level */ double suspicionLevel(long timestamp);}FailureDetector接口定义了heartbeat、isAlive、lastHeartbeat、suspicionLevel方法PhiAccrualFailureDetectorhazelcast-3.12-sources.jar!/com/hazelcast/internal/cluster/fd/PhiAccrualFailureDetector.java ...