protected RestartWithBackoffLogic( string name, TShape shape, Inlet <TIn> inlet, Outlet <TOut> outlet, TimeSpan minBackoff, TimeSpan maxBackoff, double randomFactor) : base(shape) { _name = name; _minBackoff = minBackoff; _maxBackoff = maxBackoff; _randomFactor = randomFactor; _resetDeadline = minBackoff.FromNow(); In = inlet; Out = outlet; }
protected internal override void OnTimer(object timerKey) { StartGraph(); _resetDeadline = _minBackoff.FromNow(); }
/// <summary> /// Invoked when the backoff timer ticks /// </summary> protected internal override void OnTimer(object timerKey) { StartGraph(); _resetDeadline = _settings.MaxRestartsWithin.FromNow(); }