Class PhiAccrualFailureDetector
- java.lang.Object
-
- org.onosproject.store.cluster.impl.PhiAccrualFailureDetector
-
public class PhiAccrualFailureDetector extends java.lang.ObjectPhi Accrual failure detector.Based on a paper titled: "The φ Accrual Failure Detector" by Hayashibara, et al.
-
-
Constructor Summary
Constructors Constructor Description PhiAccrualFailureDetector()PhiAccrualFailureDetector(int minSamples, long minStandardDeviationMillis)PhiAccrualFailureDetector(long minStandardDeviationMillis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetLastHeartbeatTime(org.onosproject.cluster.NodeId nodeId)Returns the last heartbeat time for the given node.doublephi(org.onosproject.cluster.NodeId nodeId)Compute phi for the specified node id.voidreport(org.onosproject.cluster.NodeId nodeId)Report a new heart beat for the specified node id.voidreport(org.onosproject.cluster.NodeId nodeId, long arrivalTime)Report a new heart beat for the specified node id.voidreset(org.onosproject.cluster.NodeId nodeId)Resets the failure detector for the given node.
-
-
-
Method Detail
-
getLastHeartbeatTime
public long getLastHeartbeatTime(org.onosproject.cluster.NodeId nodeId)
Returns the last heartbeat time for the given node.- Parameters:
nodeId- the node identifier- Returns:
- the last heartbeat time for the given node
-
report
public void report(org.onosproject.cluster.NodeId nodeId)
Report a new heart beat for the specified node id.- Parameters:
nodeId- node id
-
report
public void report(org.onosproject.cluster.NodeId nodeId, long arrivalTime)Report a new heart beat for the specified node id.- Parameters:
nodeId- node idarrivalTime- arrival time
-
reset
public void reset(org.onosproject.cluster.NodeId nodeId)
Resets the failure detector for the given node.- Parameters:
nodeId- node identifier for the node for which to reset the failure detector
-
phi
public double phi(org.onosproject.cluster.NodeId nodeId)
Compute phi for the specified node id.- Parameters:
nodeId- node id- Returns:
- phi value
-
-