Exemple #1
0
 public HystrixCircuitBreaker(IDateTimeProvider dateTimeProvider, HystrixCommandIdentifier commandIdentifier, IHystrixConfigurationService configurationService, IHystrixCommandMetrics commandMetrics)
 {
     this.dateTimeProvider     = dateTimeProvider ?? throw new ArgumentNullException(nameof(dateTimeProvider));
     this.commandIdentifier    = commandIdentifier ?? throw new ArgumentNullException(nameof(commandIdentifier));
     this.configurationService = configurationService ?? throw new ArgumentNullException(nameof(configurationService));
     this.commandMetrics       = commandMetrics ?? throw new ArgumentNullException(nameof(commandMetrics));
 }
Exemple #2
0
        public HystrixCommand(HystrixCommandIdentifier commandIdentifier, IHystrixTimeoutWrapper timeoutWrapper, IHystrixCircuitBreaker circuitBreaker, IHystrixCommandMetrics commandMetrics, IHystrixThreadPoolMetrics threadPoolMetrics, IHystrixConfigurationService configurationService)
        {
            if (commandIdentifier == null)
            {
                throw new ArgumentNullException("commandIdentifier");
            }
            if (timeoutWrapper == null)
            {
                throw new ArgumentNullException("timeoutWrapper");
            }
            if (circuitBreaker == null)
            {
                throw new ArgumentNullException("circuitBreaker");
            }
            if (commandMetrics == null)
            {
                throw new ArgumentNullException("commandMetrics");
            }
            if (threadPoolMetrics == null)
            {
                throw new ArgumentNullException("threadPoolMetrics");
            }
            if (configurationService == null)
            {
                throw new ArgumentNullException("configurationService");
            }

            this.commandIdentifier    = commandIdentifier;
            this.timeoutWrapper       = timeoutWrapper;
            this.circuitBreaker       = circuitBreaker;
            this.commandMetrics       = commandMetrics;
            this.threadPoolMetrics    = threadPoolMetrics;
            this.configurationService = configurationService;
        }
Exemple #3
0
        public HystrixCircuitBreaker(DateTimeProvider dateTimeProvider, HystrixCommandIdentifier commandIdentifier, IHystrixConfigurationService configurationService, IHystrixCommandMetrics commandMetrics)
        {
            if (commandIdentifier == null)
            {
                throw new ArgumentNullException("commandIdentifier");
            }
            if (configurationService == null)
            {
                throw new ArgumentNullException("configurationService");
            }
            if (commandMetrics == null)
            {
                throw new ArgumentNullException("commandMetrics");
            }

            this.dateTimeProvider     = dateTimeProvider;
            this.commandIdentifier    = commandIdentifier;
            this.configurationService = configurationService;
            this.commandMetrics       = commandMetrics;
        }
 public HystrixCircuitBreaker(HystrixCommandIdentifier commandIdentifier, IHystrixConfigurationService configurationService, IHystrixCommandMetrics commandMetrics)
     : this(new DateTimeProvider(), commandIdentifier, configurationService, commandMetrics)
 {
 }