An immutable key to represent a HystrixCommand for monitoring, circuit-breakers, metrics publishing, caching and other such uses. Command keys are equal if their names are equal with ordinal string comparison.
Inheritance: HystrixKey
 public IHystrixCommandProperties GetCommandProperties(HystrixCommandKey commandKey, HystrixCommandPropertiesSetter setter)
 {
     if (setter == null)
     {
         setter = UnitTestSetterFactory.GetCommandPropertiesSetter();
     }
     return new MockingHystrixCommandProperties(setter);
 }
 internal HystrixCommandMetrics(HystrixCommandKey key, HystrixCommandGroupKey commandGroup, IHystrixCommandProperties properties, IHystrixEventNotifier eventNotifier)
 {
     this.key                 = key;
     this.group               = commandGroup;
     this.properties          = properties;
     this.counter             = new HystrixRollingNumber(properties.MetricsRollingStatisticalWindowInMilliseconds, properties.MetricsRollingStatisticalWindowBuckets);
     this.percentileExecution = new HystrixRollingPercentile(properties.MetricsRollingPercentileWindowInMilliseconds, properties.MetricsRollingPercentileWindowBuckets, properties.MetricsRollingPercentileBucketSize, properties.MetricsRollingPercentileEnabled);
     this.percentileTotal     = new HystrixRollingPercentile(properties.MetricsRollingPercentileWindowInMilliseconds, properties.MetricsRollingPercentileWindowBuckets, properties.MetricsRollingPercentileBucketSize, properties.MetricsRollingPercentileEnabled);
     this.eventNotifier       = eventNotifier;
 }
Example #3
0
 public RequestCacheKey(HystrixCommandKey commandKey, IHystrixConcurrencyStrategy concurrencyStrategy)
 {
     type = 1;
     if (commandKey == null)
     {
         this.key = null;
     }
     else
     {
         this.key = commandKey.Name;
     }
     this.concurrencyStrategy = concurrencyStrategy;
 }
 public RequestCacheKey(HystrixCommandKey commandKey, IHystrixConcurrencyStrategy concurrencyStrategy)
 {
     type = 1;
     if (commandKey == null)
     {
         this.key = null;
     }
     else
     {
         this.key = commandKey.Name;
     }
     this.concurrencyStrategy = concurrencyStrategy;
 }
 private static IHystrixCircuitBreaker GetCircuitBreaker(HystrixCommandKey key, HystrixCommandGroupKey commandGroup, HystrixCommandMetrics metrics, HystrixCommandPropertiesSetter properties)
 {
     return new HystrixCircuitBreakerImpl(new MockingHystrixCommandProperties(properties), metrics);
 }
 public static HystrixCommandMetrics GetInstance(HystrixCommandKey key)
 {
     return(metrics[key.Name]);
 }
 public static HystrixCommandMetrics GetInstance(HystrixCommandKey key, HystrixCommandGroupKey commandGroup, IHystrixCommandProperties properties)
 {
     return(metrics.GetOrAdd(key.Name, w => new HystrixCommandMetrics(key, commandGroup, properties, HystrixPlugins.Instance.EventNotifier)));
 }
Example #8
0
 public IHystrixMetricsPublisherCommand GetMetricsPublisherForCommand(HystrixCommandKey commandKey, HystrixCommandGroupKey commandGroupKey, HystrixCommandMetrics metrics, IHystrixCircuitBreaker circuitBreaker, IHystrixCommandProperties properties)
 {
     return new HystrixServoMetricsPublisherCommand(commandKey, commandGroupKey, metrics, circuitBreaker, properties);
 }
Example #9
0
 public HystrixCommandSetter AndCommandKey(HystrixCommandKey commandKey)
 {
     CommandKey = commandKey;
     return(this);
 }
 public string GetCommandPropertiesCacheKey(HystrixCommandKey commandKey, HystrixCommandPropertiesSetter setter)
 {
     return null;
 }
Example #11
0
 public static HystrixRequestCache GetInstance(HystrixCommandKey key, IHystrixConcurrencyStrategy concurrencyStrategy)
 {
     return(GetInstance(new RequestCacheKey(key, concurrencyStrategy), concurrencyStrategy));
 }
 public HystrixCommandSetter AndCommandKey(HystrixCommandKey commandKey)
 {
     CommandKey = commandKey;
     return this;
 }