
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.hystrix.HystrixCommandProperties
public abstract class HystrixCommandProperties
Properties for instances of HystrixCommand.
Default implementation of methods uses Archaius (https://github.com/Netflix/archaius)
| Nested Class Summary | |
|---|---|
static class |
HystrixCommandProperties.ExecutionIsolationStrategy
Isolation strategy to use when executing a HystrixCommand. |
static class |
HystrixCommandProperties.Setter
Fluent interface that allows chained setting of properties that can be passed into a HystrixCommand constructor to inject instance specific property overrides. |
| Constructor Summary | |
|---|---|
protected |
HystrixCommandProperties(HystrixCommandKey key)
|
protected |
HystrixCommandProperties(HystrixCommandKey key,
HystrixCommandProperties.Setter builder)
|
protected |
HystrixCommandProperties(HystrixCommandKey key,
HystrixCommandProperties.Setter builder,
java.lang.String propertyPrefix)
|
| Method Summary | |
|---|---|
HystrixProperty<java.lang.Boolean> |
circuitBreakerEnabled()
Whether to use a HystrixCircuitBreaker or not. |
HystrixProperty<java.lang.Integer> |
circuitBreakerErrorThresholdPercentage()
Error percentage threshold (as whole number such as 50) at which point the circuit breaker will trip open and reject requests. |
HystrixProperty<java.lang.Boolean> |
circuitBreakerForceClosed()
If true the HystrixCircuitBreaker.allowRequest() will always return true to allow requests regardless of the error percentage from HystrixCommandMetrics.getHealthCounts(). |
HystrixProperty<java.lang.Boolean> |
circuitBreakerForceOpen()
If true the HystrixCircuitBreaker.allowRequest() will always return false, causing the circuit to be open (tripped) and reject all requests. |
HystrixProperty<java.lang.Integer> |
circuitBreakerRequestVolumeThreshold()
Minimum number of requests in the HystrixCommandProperties.metricsRollingStatisticalWindowInMilliseconds() that must exist before the HystrixCircuitBreaker will trip. |
HystrixProperty<java.lang.Integer> |
circuitBreakerSleepWindowInMilliseconds()
The time in milliseconds after a HystrixCircuitBreaker trips open that it should wait before trying requests again. |
HystrixProperty<java.lang.Integer> |
executionIsolationSemaphoreMaxConcurrentRequests()
Number of concurrent requests permitted to HystrixCommand.run(). |
HystrixProperty<HystrixCommandProperties.ExecutionIsolationStrategy> |
executionIsolationStrategy()
What isolation strategy HystrixCommand.run() will be executed with. |
HystrixProperty<java.lang.Boolean> |
executionIsolationThreadInterruptOnTimeout()
Whether the execution thread should attempt an interrupt (using Future.cancel(boolean)) when a thread times out. |
HystrixProperty<java.lang.String> |
executionIsolationThreadPoolKeyOverride()
Allow a dynamic override of the HystrixThreadPoolKey that will dynamically change which HystrixThreadPool a HystrixCommand executes on. |
HystrixProperty<java.lang.Integer> |
executionIsolationThreadTimeoutInMilliseconds()
Time in milliseconds at which point the calling thread will timeout (using Future.get()) and walk away from the executing thread. |
HystrixProperty<java.lang.Boolean> |
fallbackEnabled()
Whether HystrixCommand.getFallback() should be attempted when failure occurs. |
HystrixProperty<java.lang.Integer> |
fallbackIsolationSemaphoreMaxConcurrentRequests()
Number of concurrent requests permitted to HystrixCommand.getFallback(). |
HystrixProperty<java.lang.Integer> |
metricsHealthSnapshotIntervalInMilliseconds()
Time in milliseconds to wait between allowing health snapshots to be taken that calculate success and error percentages and affect HystrixCircuitBreaker.isOpen() status. |
HystrixProperty<java.lang.Integer> |
metricsRollingPercentileBucketSize()
Maximum number of values stored in each bucket of the rolling percentile. |
HystrixProperty<java.lang.Boolean> |
metricsRollingPercentileEnabled()
Whether percentile metrics should be captured using HystrixRollingPercentile inside HystrixCommandMetrics. |
HystrixProperty<java.lang.Integer> |
metricsRollingPercentileWindow()
Deprecated. Use HystrixCommandProperties.metricsRollingPercentileWindowInMilliseconds() |
HystrixProperty<java.lang.Integer> |
metricsRollingPercentileWindowBuckets()
Number of buckets the rolling percentile window is broken into. |
HystrixProperty<java.lang.Integer> |
metricsRollingPercentileWindowInMilliseconds()
Duration of percentile rolling window in milliseconds. |
HystrixProperty<java.lang.Integer> |
metricsRollingStatisticalWindowBuckets()
Number of buckets the rolling statistical window is broken into. |
HystrixProperty<java.lang.Integer> |
metricsRollingStatisticalWindowInMilliseconds()
Duration of statistical rolling window in milliseconds. |
HystrixProperty<java.lang.Boolean> |
requestCacheEnabled()
Whether HystrixCommand.getCacheKey() should be used with HystrixRequestCache to provide de-duplication functionality via request-scoped caching. |
HystrixProperty<java.lang.Boolean> |
requestLogEnabled()
Whether HystrixCommand execution and events should be logged to HystrixRequestLog. |
static HystrixCommandProperties.Setter |
Setter()
Factory method to retrieve the default Setter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected HystrixCommandProperties(HystrixCommandKey key)
protected HystrixCommandProperties(HystrixCommandKey key,
HystrixCommandProperties.Setter builder)
protected HystrixCommandProperties(HystrixCommandKey key,
HystrixCommandProperties.Setter builder,
java.lang.String propertyPrefix)
| Method Detail |
|---|
public HystrixProperty<java.lang.Boolean> circuitBreakerEnabled()
HystrixCircuitBreaker or not. If false no circuit-breaker logic will be used and all requests permitted.
This is similar in effect to HystrixCommandProperties.circuitBreakerForceClosed() except that continues tracking metrics and knowing whether it
should be open/closed, this property results in not even instantiating a circuit-breaker.
HystrixProperty<Boolean>public HystrixProperty<java.lang.Integer> circuitBreakerErrorThresholdPercentage()
It will stay tripped for the duration defined in HystrixCommandProperties.circuitBreakerSleepWindowInMilliseconds();
The error percentage this is compared against comes from HystrixCommandMetrics.getHealthCounts().
HystrixProperty<Integer>public HystrixProperty<java.lang.Boolean> circuitBreakerForceClosed()
HystrixCircuitBreaker.allowRequest() will always return true to allow requests regardless of the error percentage from HystrixCommandMetrics.getHealthCounts().
The HystrixCommandProperties.circuitBreakerForceOpen() property takes precedence so if it set to true this property does nothing.
HystrixProperty<Boolean>public HystrixProperty<java.lang.Boolean> circuitBreakerForceOpen()
HystrixCircuitBreaker.allowRequest() will always return false, causing the circuit to be open (tripped) and reject all requests.
This property takes precedence over HystrixCommandProperties.circuitBreakerForceClosed();
HystrixProperty<Boolean>public HystrixProperty<java.lang.Integer> circuitBreakerRequestVolumeThreshold()
HystrixCommandProperties.metricsRollingStatisticalWindowInMilliseconds() that must exist before the HystrixCircuitBreaker will trip.
If below this number the circuit will not trip regardless of error percentage.
HystrixProperty<Integer>public HystrixProperty<java.lang.Integer> circuitBreakerSleepWindowInMilliseconds()
HystrixCircuitBreaker trips open that it should wait before trying requests again.
HystrixProperty<Integer>public HystrixProperty<java.lang.Integer> executionIsolationSemaphoreMaxConcurrentRequests()
HystrixCommand.run(). Requests beyond the concurrent limit will be rejected.
Applicable only when HystrixCommandProperties.executionIsolationStrategy() == SEMAPHORE.
HystrixProperty<Integer>public HystrixProperty<HystrixCommandProperties.ExecutionIsolationStrategy> executionIsolationStrategy()
HystrixCommand.run() will be executed with.
If HystrixCommandProperties.ExecutionIsolationStrategy.THREAD then it will be executed on a separate thread and concurrent requests limited by the number of threads in the thread-pool.
If HystrixCommandProperties.ExecutionIsolationStrategy.SEMAPHORE then it will be executed on the calling thread and concurrent requests limited by the semaphore count.
HystrixProperty<Boolean>public HystrixProperty<java.lang.Boolean> executionIsolationThreadInterruptOnTimeout()
Future.cancel(boolean)) when a thread times out.
Applicable only when HystrixCommandProperties.executionIsolationStrategy() == THREAD.
HystrixProperty<Boolean>public HystrixProperty<java.lang.String> executionIsolationThreadPoolKeyOverride()
HystrixThreadPoolKey that will dynamically change which HystrixThreadPool a HystrixCommand executes on.
Typically this should return NULL which will cause it to use the HystrixThreadPoolKey injected into a HystrixCommand or derived from the HystrixCommandGroupKey.
When set the injected or derived values will be ignored and a new HystrixThreadPool created (if necessary) and the HystrixCommand will begin using the newly defined pool.
HystrixProperty<String>public HystrixProperty<java.lang.Integer> executionIsolationThreadTimeoutInMilliseconds()
Future.get()) and walk away from the executing thread.
If HystrixCommandProperties.executionIsolationThreadInterruptOnTimeout == true the executing thread will be interrupted.
Applicable only when HystrixCommandProperties.executionIsolationStrategy() == THREAD.
HystrixProperty<Integer>public HystrixProperty<java.lang.Integer> fallbackIsolationSemaphoreMaxConcurrentRequests()
HystrixCommand.getFallback(). Requests beyond the concurrent limit will fail-fast and not attempt retrieving a fallback.
HystrixProperty<Integer>public HystrixProperty<java.lang.Boolean> fallbackEnabled()
HystrixCommand.getFallback() should be attempted when failure occurs.
HystrixProperty<Boolean>public HystrixProperty<java.lang.Integer> metricsHealthSnapshotIntervalInMilliseconds()
HystrixCircuitBreaker.isOpen() status.
On high-volume circuits the continual calculation of error percentage can become CPU intensive thus this controls how often it is calculated.
HystrixProperty<Integer>public HystrixProperty<java.lang.Integer> metricsRollingPercentileBucketSize()
HystrixRollingPercentile inside HystrixCommandMetrics.
HystrixProperty<Integer>public HystrixProperty<java.lang.Boolean> metricsRollingPercentileEnabled()
HystrixRollingPercentile inside HystrixCommandMetrics.
HystrixProperty<Boolean>public HystrixProperty<java.lang.Integer> metricsRollingPercentileWindow()
HystrixCommandProperties.metricsRollingPercentileWindowInMilliseconds()
HystrixRollingPercentile inside HystrixCommandMetrics.
HystrixProperty<Integer>public HystrixProperty<java.lang.Integer> metricsRollingPercentileWindowInMilliseconds()
HystrixRollingPercentile inside HystrixCommandMetrics.
HystrixProperty<Integer>public HystrixProperty<java.lang.Integer> metricsRollingPercentileWindowBuckets()
HystrixRollingPercentile inside HystrixCommandMetrics.
HystrixProperty<Integer>public HystrixProperty<java.lang.Integer> metricsRollingStatisticalWindowInMilliseconds()
HystrixRollingNumber inside HystrixCommandMetrics.
HystrixProperty<Integer>public HystrixProperty<java.lang.Integer> metricsRollingStatisticalWindowBuckets()
HystrixRollingNumber inside HystrixCommandMetrics.
HystrixProperty<Integer>public HystrixProperty<java.lang.Boolean> requestCacheEnabled()
HystrixCommand.getCacheKey() should be used with HystrixRequestCache to provide de-duplication functionality via request-scoped caching.
HystrixProperty<Boolean>public HystrixProperty<java.lang.Boolean> requestLogEnabled()
HystrixCommand execution and events should be logged to HystrixRequestLog.
HystrixProperty<Boolean>public static HystrixCommandProperties.Setter Setter()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||