public override bool Equals(object o)
        {
            if (this == o)
            {
                return(true);
            }

            if (o == null || GetType() != o.GetType())
            {
                return(false);
            }

            ExecutionSignature that = (ExecutionSignature)o;

            if (!CommandName.Equals(that.CommandName))
            {
                return(false);
            }

            if (!Eventcounts.Equals(that.Eventcounts))
            {
                return(false);
            }

            return(!(_cacheKey != null ? !_cacheKey.Equals(that._cacheKey) : that._cacheKey != null));
        }
        public override int GetHashCode()
        {
            int result = CommandName.GetHashCode();

            result = (31 * result) + Eventcounts.GetHashCode();
            result = (31 * result) + (_cacheKey != null ? _cacheKey.GetHashCode() : 0);
            return(result);
        }
示例#3
0
 public ExecutionResult AddEvent(HystrixEventType eventType)
 {
     return(new ExecutionResult(
                Eventcounts.Plus(eventType),
                StartTimestamp,
                ExecutionLatency,
                UserThreadLatency,
                Exception,
                ExecutionException,
                ExecutionOccurred,
                IsExecutedInThread,
                CollapserKey));
 }
示例#4
0
 public ExecutionResult MarkCollapsed(IHystrixCollapserKey collapserKey, int sizeOfBatch)
 {
     return(new ExecutionResult(
                Eventcounts.Plus(HystrixEventType.COLLAPSED, sizeOfBatch),
                StartTimestamp,
                ExecutionLatency,
                UserThreadLatency,
                Exception,
                ExecutionException,
                ExecutionOccurred,
                IsExecutedInThread,
                collapserKey));
 }
示例#5
0
 public ExecutionResult AddEvent(int executionLatency, HystrixEventType eventType)
 {
     if (StartTimestamp >= 0 && !IsResponseRejected)
     {
         return(new ExecutionResult(
                    Eventcounts.Plus(eventType),
                    StartTimestamp,
                    executionLatency,
                    UserThreadLatency,
                    Exception,
                    ExecutionException,
                    ExecutionOccurred,
                    IsExecutedInThread,
                    CollapserKey));
     }
     else
     {
         return(AddEvent(eventType));
     }
 }