예제 #1
0
        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;
        }
예제 #2
0
 protected internal override void OnTimer(object timerKey)
 {
     StartGraph();
     _resetDeadline = _minBackoff.FromNow();
 }
예제 #3
0
 /// <summary>
 /// Invoked when the backoff timer ticks
 /// </summary>
 protected internal override void OnTimer(object timerKey)
 {
     StartGraph();
     _resetDeadline = _settings.MaxRestartsWithin.FromNow();
 }