public DeadlineFailureDetector ( System.TimeSpan acceptableHeartbeatPause, System.Clock clock = null ) : System | ||
acceptableHeartbeatPause | System.TimeSpan | Duration corresponding to number of potentially lost/delayed /// heartbeats that will be accepted before considering it to be an anomaly. /// This margin is important to be able to survive sudden, occasional, pauses in heartbeat /// arrivals, due to for example garbage collect or network drop. |
clock | System.Clock | The clock, returning current time in milliseconds, but can be faked for testing /// purposes. It is only used for measuring intervals (duration). |
Résultat | System |
public DeadlineFailureDetector(TimeSpan acceptableHeartbeatPause, Clock clock = null) : this(clock)
{
_acceptableHeartbeatPause = acceptableHeartbeatPause;
_acceptableHeartbeatMillis = Convert.ToInt64(acceptableHeartbeatPause.TotalMilliseconds);
if (_acceptableHeartbeatPause <= TimeSpan.Zero) throw new ArgumentException("acceptable-heartbeat-pause must be greater than zero");
}
DeadlineFailureDetector::DeadlineFailureDetector ( System.Clock clock ) : System | |
DeadlineFailureDetector::DeadlineFailureDetector ( |