Example #1
0
        protected virtual void OnPulseStateChange(object sender, RedisCardioPulseStatus status)
        {
            var onPulseStateChange = m_OnPulseStateChange;

            if (onPulseStateChange != null)
            {
                onPulseStateChange(sender, status);
            }
        }
Example #2
0
        protected virtual void OnPulseStateChanged(RedisCardioPulseStatus status)
        {
            var onPulseFail = m_OnPulseStateChange;

            if (onPulseFail != null)
            {
                onPulseFail.InvokeAsync(this, status);
            }
        }
        protected virtual void OnPulseStateChange(object sender, RedisCardioPulseStatus status)
        {
            var onPulseStateChange = m_OnPulseStateChange;

            if (onPulseStateChange != null)
            {
                Action failAction = () =>
                {
                    onPulseStateChange(this, status);
                };
                failAction.InvokeAsync();
            }
        }
Example #4
0
        private bool CanUpdateHealthState(object sender, RedisCardioPulseStatus status)
        {
            if (status.NewStatus != status.CurrentStatus)
            {
                var strategy = m_StateUpdateStrategy;
                if (strategy != null)
                {
                    return(strategy(sender, status));
                }

                return(status.FailCount == RedisConstants.CardioProbeStatusChangeRetryCount ||
                       status.SuccessCount == RedisConstants.CardioProbeStatusChangeRetryCount);
            }
            return(false);
        }
Example #5
0
 protected virtual void OnPulseStateChange(object sender, RedisCardioPulseStatus status)
 {
 }
Example #6
0
 void IRedisHeartBeatProbe.PulseStateChanged(RedisCardioPulseStatus status)
 {
     OnPulseStateChanged(status);
 }