示例#1
0
 private static HystrixRequestCache GetInstance(RequestCacheKey rcKey, IHystrixConcurrencyStrategy concurrencyStrategy)
 {
     return(caches.GetOrAdd(rcKey, w =>
     {
         return new HystrixRequestCache(rcKey, concurrencyStrategy);
     }));
 }
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            RequestCacheKey other = (RequestCacheKey)obj;

            if (type != other.type)
            {
                return(false);
            }
            if (key == null)
            {
                if (other.key != null)
                {
                    return(false);
                }
            }
            else if (!key.Equals(other.key))
            {
                return(false);
            }
            if (concurrencyStrategy == null)
            {
                if (other.concurrencyStrategy != null)
                {
                    return(false);
                }
            }
            else if (!concurrencyStrategy.Equals(other.concurrencyStrategy))
            {
                return(false);
            }
            return(true);
        }
示例#3
0
 public ValueCacheKey(RequestCacheKey rvKey, String valueCacheKey)
 {
     this.rvKey         = rvKey;
     this.valueCacheKey = valueCacheKey;
 }
示例#4
0
 public ValueCacheKey(RequestCacheKey rvKey, String valueCacheKey)
 {
     this.rvKey = rvKey;
     this.valueCacheKey = valueCacheKey;
 }
示例#5
0
 private HystrixRequestCache(RequestCacheKey rcKey, IHystrixConcurrencyStrategy concurrencyStrategy)
 {
     this.rcKey = rcKey;
     this.concurrencyStrategy = concurrencyStrategy;
 }