@Override public Number getValue() { return properties.fallbackIsolationSemaphoreMaxConcurrentRequests().get(); } });
/** * Get the TryableSemaphore this HystrixCommand should use if a fallback occurs. * * @return TryableSemaphore */ protected TryableSemaphore getFallbackSemaphore() { if (fallbackSemaphoreOverride == null) { TryableSemaphore _s = fallbackSemaphorePerCircuit.get(commandKey.name()); if (_s == null) { // we didn't find one cache so setup fallbackSemaphorePerCircuit.putIfAbsent(commandKey.name(), new TryableSemaphoreActual(properties.fallbackIsolationSemaphoreMaxConcurrentRequests())); // assign whatever got set (this or another thread) return fallbackSemaphorePerCircuit.get(commandKey.name()); } else { return _s; } } else { return fallbackSemaphoreOverride; } }
assertEquals(false, command.getProperties().executionIsolationThreadInterruptOnTimeout().get().booleanValue()); assertEquals(10, command.getProperties().executionIsolationSemaphoreMaxConcurrentRequests().get().intValue()); assertEquals(15, command.getProperties().fallbackIsolationSemaphoreMaxConcurrentRequests().get().intValue()); assertEquals(false, command.getProperties().fallbackEnabled().get().booleanValue()); assertEquals(false, command.getProperties().circuitBreakerEnabled().get().booleanValue());
commandProperties.executionTimeoutInMilliseconds().get(), commandProperties.fallbackEnabled().get(), commandProperties.fallbackIsolationSemaphoreMaxConcurrentRequests().get(), commandProperties.requestCacheEnabled().get(), commandProperties.requestLogEnabled().get()
@Override public Number getValue() { return properties.fallbackIsolationSemaphoreMaxConcurrentRequests().get(); } });
@Override public Number getValue() { return properties.fallbackIsolationSemaphoreMaxConcurrentRequests().get(); } });
@Override public Number value() { return properties.fallbackIsolationSemaphoreMaxConcurrentRequests().get(); } });
@Override public Number call() { return properties.fallbackIsolationSemaphoreMaxConcurrentRequests().get(); } });
/** * Get the TryableSemaphore this HystrixCommand should use if a fallback occurs. * * @return TryableSemaphore */ protected TryableSemaphore getFallbackSemaphore() { if (fallbackSemaphoreOverride == null) { TryableSemaphore _s = fallbackSemaphorePerCircuit.get(commandKey.name()); if (_s == null) { // we didn't find one cache so setup fallbackSemaphorePerCircuit.putIfAbsent(commandKey.name(), new TryableSemaphoreActual(properties.fallbackIsolationSemaphoreMaxConcurrentRequests())); // assign whatever got set (this or another thread) return fallbackSemaphorePerCircuit.get(commandKey.name()); } else { return _s; } } else { return fallbackSemaphoreOverride; } }
json.writeStringField("propertyValue_executionIsolationThreadPoolKeyOverride", commandProperties.executionIsolationThreadPoolKeyOverride().get()); json.writeNumberField("propertyValue_executionIsolationSemaphoreMaxConcurrentRequests", commandProperties.executionIsolationSemaphoreMaxConcurrentRequests().get()); json.writeNumberField("propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests", commandProperties.fallbackIsolationSemaphoreMaxConcurrentRequests().get());
json.writeStringField("propertyValue_executionIsolationThreadPoolKeyOverride", commandProperties.executionIsolationThreadPoolKeyOverride().get()); json.writeNumberField("propertyValue_executionIsolationSemaphoreMaxConcurrentRequests", commandProperties.executionIsolationSemaphoreMaxConcurrentRequests().get()); json.writeNumberField("propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests", commandProperties.fallbackIsolationSemaphoreMaxConcurrentRequests().get());
json.writeStringField("propertyValue_executionIsolationThreadPoolKeyOverride", commandProperties.executionIsolationThreadPoolKeyOverride().get()); json.writeNumberField("propertyValue_executionIsolationSemaphoreMaxConcurrentRequests", commandProperties.executionIsolationSemaphoreMaxConcurrentRequests().get()); json.writeNumberField("propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests", commandProperties.fallbackIsolationSemaphoreMaxConcurrentRequests().get());
json.writeStringField("propertyValue_executionIsolationThreadPoolKeyOverride", commandProperties.executionIsolationThreadPoolKeyOverride().get()); json.writeNumberField("propertyValue_executionIsolationSemaphoreMaxConcurrentRequests", commandProperties.executionIsolationSemaphoreMaxConcurrentRequests().get()); json.writeNumberField("propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests", commandProperties.fallbackIsolationSemaphoreMaxConcurrentRequests().get());
public static TenacityConfiguration getTenacityConfiguration(TenacityPropertyKey key) { final HystrixCommandProperties commandProperties = TenacityCommand.getCommandProperties(key); final HystrixThreadPoolProperties threadPoolProperties = TenacityCommand.getThreadpoolProperties(key); return new TenacityConfiguration( new ThreadPoolConfiguration( threadPoolProperties.coreSize().get(), threadPoolProperties.keepAliveTimeMinutes().get(), threadPoolProperties.maxQueueSize().get(), threadPoolProperties.queueSizeRejectionThreshold().get(), threadPoolProperties.metricsRollingStatisticalWindowInMilliseconds().get(), threadPoolProperties.metricsRollingStatisticalWindowBuckets().get()), new CircuitBreakerConfiguration( commandProperties.circuitBreakerRequestVolumeThreshold().get(), commandProperties.circuitBreakerSleepWindowInMilliseconds().get(), commandProperties.circuitBreakerErrorThresholdPercentage().get(), commandProperties.metricsRollingStatisticalWindowInMilliseconds().get(), commandProperties.metricsRollingStatisticalWindowBuckets().get()), new SemaphoreConfiguration( commandProperties.executionIsolationSemaphoreMaxConcurrentRequests().get(), commandProperties.fallbackIsolationSemaphoreMaxConcurrentRequests().get()), commandProperties.executionTimeoutInMilliseconds().get(), commandProperties.executionIsolationStrategy().get()); } }
public static TenacityConfiguration getTenacityConfiguration(TenacityPropertyKey key) { final HystrixCommandProperties commandProperties = TenacityCommand.getCommandProperties(key); final HystrixThreadPoolProperties threadPoolProperties = TenacityCommand.getThreadpoolProperties(key); return new TenacityConfiguration( new ThreadPoolConfiguration( threadPoolProperties.coreSize().get(), threadPoolProperties.keepAliveTimeMinutes().get(), threadPoolProperties.maxQueueSize().get(), threadPoolProperties.queueSizeRejectionThreshold().get(), threadPoolProperties.metricsRollingStatisticalWindowInMilliseconds().get(), threadPoolProperties.metricsRollingStatisticalWindowBuckets().get()), new CircuitBreakerConfiguration( commandProperties.circuitBreakerRequestVolumeThreshold().get(), commandProperties.circuitBreakerSleepWindowInMilliseconds().get(), commandProperties.circuitBreakerErrorThresholdPercentage().get(), commandProperties.metricsRollingStatisticalWindowInMilliseconds().get(), commandProperties.metricsRollingStatisticalWindowBuckets().get()), new SemaphoreConfiguration( commandProperties.executionIsolationSemaphoreMaxConcurrentRequests().get(), commandProperties.fallbackIsolationSemaphoreMaxConcurrentRequests().get()), commandProperties.executionTimeoutInMilliseconds().get(), commandProperties.executionIsolationStrategy().get()); } }
commandProperties.executionTimeoutInMilliseconds().get(), commandProperties.fallbackEnabled().get(), commandProperties.fallbackIsolationSemaphoreMaxConcurrentRequests().get(), commandProperties.requestCacheEnabled().get(), commandProperties.requestLogEnabled().get()