Exemple #1
0
        public virtual void MarkDead(Uri uri, int?deadTimeout, int?maxDeadTimeout)
        {
            EndpointState state = null;

            if (!this._uriLookup.TryGetValue(uri, out state))
            {
                return;
            }
            lock (state)
            {
                state.date = this._dateTimeProvider.DeadTime(uri, state._attempts, deadTimeout, maxDeadTimeout);
            }
        }
Exemple #2
0
        public virtual void MarkAlive(Uri uri)
        {
            EndpointState state = null;

            if (!this._uriLookup.TryGetValue(uri, out state))
            {
                return;
            }
            lock (state)
            {
                var aliveTime = this._dateTimeProvider.AliveTime(uri, state._attempts);
                state.date      = aliveTime;
                state._attempts = 0;
            }
        }