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); }
public ValueCacheKey(RequestCacheKey rvKey, String valueCacheKey) { this.rvKey = rvKey; this.valueCacheKey = valueCacheKey; }
private HystrixRequestCache(RequestCacheKey rcKey, IHystrixConcurrencyStrategy concurrencyStrategy) { this.rcKey = rcKey; this.concurrencyStrategy = concurrencyStrategy; }