Beispiel #1
0
 public static void RegisterEventNotifier(HystrixEventNotifier impl)
 {
     if (!notifier.CompareAndSet(null, impl))
     {
         throw new InvalidOperationException("Another strategy was already registered.");
     }
 }
        internal HystrixCommandMetrics(IHystrixCommandKey key, IHystrixCommandGroupKey commandGroup, IHystrixThreadPoolKey threadPoolKey, IHystrixCommandOptions properties, HystrixEventNotifier eventNotifier)
            : base(null)
        {
            CommandKey    = key;
            CommandGroup  = commandGroup;
            ThreadPoolKey = threadPoolKey;
            Properties    = properties;

            _healthCountsStream = HealthCountsStream.GetInstance(key, properties);
            _rollingCommandEventCounterStream    = RollingCommandEventCounterStream.GetInstance(key, properties);
            _cumulativeCommandEventCounterStream = CumulativeCommandEventCounterStream.GetInstance(key, properties);

            _rollingCommandLatencyDistributionStream     = RollingCommandLatencyDistributionStream.GetInstance(key, properties);
            _rollingCommandUserLatencyDistributionStream = RollingCommandUserLatencyDistributionStream.GetInstance(key, properties);
            _rollingCommandMaxConcurrencyStream          = RollingCommandMaxConcurrencyStream.GetInstance(key, properties);
        }