コード例 #1
0
        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));
        }
コード例 #2
0
        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));
     }
 }