예제 #1
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);
                }
                return(true);
            }
        private int GenerateHashCode()
        {
            unchecked
            {
                int hash = 17;

                if (RequestCacheKey != null)
                {
                    hash = hash * 92821 + RequestCacheKey.GetHashCode( );
                }

                if (EntityIdList != null)
                {
                    hash = hash * 92821 + EntityIdList.GetHashCode( );
                }

                if (Filter != null)
                {
                    hash = hash * 92821 + Filter.GetHashCode( );
                }

                return(hash);
            }
        }
예제 #3
0
 private HystrixRequestCache(RequestCacheKey rcKey)
 {
     this.rcKey = rcKey;
 }
예제 #4
0
 private static HystrixRequestCache GetInstance(RequestCacheKey rcKey)
 {
     return(Caches.GetOrAddEx(rcKey, (k) => new HystrixRequestCache(rcKey)));
 }
예제 #5
0
 public ValueCacheKey(RequestCacheKey rvKey, string valueCacheKey)
 {
     this.rvKey         = rvKey;
     this.valueCacheKey = valueCacheKey;
 }
예제 #6
0
 public ValueCacheKey(RequestCacheKey rvKey, string valueCacheKey)
 {
     _rvKey         = rvKey;
     _valueCacheKey = valueCacheKey;
 }