Пример #1
0
 private static HystrixRequestCache GetInstance(RequestCacheKey rcKey, IHystrixConcurrencyStrategy concurrencyStrategy)
 {
     return(caches.GetOrAdd(rcKey, w =>
     {
         return new HystrixRequestCache(rcKey, concurrencyStrategy);
     }));
 }
Пример #2
0
        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;
 }