public static class CircuitBreakerConfigurationProperties.InstanceProperties
extends java.lang.Object
CircuitBreaker
instances.| Constructor and Description |
|---|
InstanceProperties() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Boolean |
getAllowHealthIndicatorToFail() |
java.lang.Boolean |
getAutomaticTransitionFromOpenToHalfOpenEnabled()
Returns if we should automatically transition to half open after the timer has run out.
|
java.lang.String |
getBaseConfig()
Gets the shared configuration name.
|
java.lang.Boolean |
getEnableExponentialBackoff() |
java.lang.Boolean |
getEnableRandomizedWait() |
java.lang.Integer |
getEventConsumerBufferSize() |
java.lang.Double |
getExponentialBackoffMultiplier() |
java.lang.Float |
getFailureRateThreshold()
Returns the failure rate threshold for the circuit breaker as percentage.
|
java.lang.Class<? extends java.lang.Throwable>[] |
getIgnoreExceptions() |
java.lang.Integer |
getMinimumNumberOfCalls() |
java.lang.Integer |
getPermittedNumberOfCallsInHalfOpenState() |
java.lang.Double |
getRandomizedWaitFactor() |
java.lang.Class<? extends java.lang.Throwable>[] |
getRecordExceptions() |
java.lang.Class<java.util.function.Predicate<java.lang.Throwable>> |
getRecordFailurePredicate() |
java.lang.Boolean |
getRegisterHealthIndicator() |
java.lang.Integer |
getRingBufferSizeInClosedState()
Returns the ring buffer size for the circuit breaker while in closed state.
|
java.lang.Integer |
getRingBufferSizeInHalfOpenState()
Returns the ring buffer size for the circuit breaker while in half open state.
|
java.lang.Integer |
getSlidingWindowSize() |
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig.SlidingWindowType |
getSlidingWindowType() |
java.time.Duration |
getSlowCallDurationThreshold() |
java.lang.Float |
getSlowCallRateThreshold() |
java.time.Duration |
getWaitDurationInOpenState()
Returns the wait duration the CircuitBreaker will stay open, before it switches to half
closed.
|
java.lang.Boolean |
getWritableStackTraceEnabled()
Returns if we should enable writable stack traces or not.
|
CircuitBreakerConfigurationProperties.InstanceProperties |
setAllowHealthIndicatorToFail(java.lang.Boolean allowHealthIndicatorToFail)
When set to true, it allows the health indicator to go to a failed (DOWN) status.
|
CircuitBreakerConfigurationProperties.InstanceProperties |
setAutomaticTransitionFromOpenToHalfOpenEnabled(java.lang.Boolean automaticTransitionFromOpenToHalfOpenEnabled)
Sets if we should automatically transition to half open after the timer has run out.
|
CircuitBreakerConfigurationProperties.InstanceProperties |
setBaseConfig(java.lang.String baseConfig)
Sets the shared configuration name.
|
CircuitBreakerConfigurationProperties.InstanceProperties |
setEnableExponentialBackoff(java.lang.Boolean enableExponentialBackoff) |
CircuitBreakerConfigurationProperties.InstanceProperties |
setEnableRandomizedWait(java.lang.Boolean enableRandomizedWait) |
CircuitBreakerConfigurationProperties.InstanceProperties |
setEventConsumerBufferSize(java.lang.Integer eventConsumerBufferSize) |
CircuitBreakerConfigurationProperties.InstanceProperties |
setExponentialBackoffMultiplier(java.lang.Double exponentialBackoffMultiplier) |
CircuitBreakerConfigurationProperties.InstanceProperties |
setFailureRateThreshold(java.lang.Float failureRateThreshold)
Sets the failure rate threshold for the circuit breaker as percentage.
|
CircuitBreakerConfigurationProperties.InstanceProperties |
setIgnoreExceptions(java.lang.Class<? extends java.lang.Throwable>[] ignoreExceptions) |
void |
setMinimumNumberOfCalls(java.lang.Integer minimumNumberOfCalls) |
void |
setPermittedNumberOfCallsInHalfOpenState(java.lang.Integer permittedNumberOfCallsInHalfOpenState) |
CircuitBreakerConfigurationProperties.InstanceProperties |
setRandomizedWaitFactor(java.lang.Double randomizedWaitFactor) |
CircuitBreakerConfigurationProperties.InstanceProperties |
setRecordExceptions(java.lang.Class<? extends java.lang.Throwable>[] recordExceptions) |
CircuitBreakerConfigurationProperties.InstanceProperties |
setRecordFailurePredicate(java.lang.Class<java.util.function.Predicate<java.lang.Throwable>> recordFailurePredicate) |
CircuitBreakerConfigurationProperties.InstanceProperties |
setRegisterHealthIndicator(java.lang.Boolean registerHealthIndicator) |
CircuitBreakerConfigurationProperties.InstanceProperties |
setRingBufferSizeInClosedState(java.lang.Integer ringBufferSizeInClosedState)
Deprecated.
Use
setSlidingWindowSize(Integer) instead. |
CircuitBreakerConfigurationProperties.InstanceProperties |
setRingBufferSizeInHalfOpenState(java.lang.Integer ringBufferSizeInHalfOpenState)
Deprecated.
Use
setPermittedNumberOfCallsInHalfOpenState(Integer) instead. |
void |
setSlidingWindowSize(java.lang.Integer slidingWindowSize) |
void |
setSlidingWindowType(io.github.resilience4j.circuitbreaker.CircuitBreakerConfig.SlidingWindowType slidingWindowType) |
void |
setSlowCallDurationThreshold(java.time.Duration slowCallDurationThreshold) |
void |
setSlowCallRateThreshold(java.lang.Float slowCallRateThreshold) |
CircuitBreakerConfigurationProperties.InstanceProperties |
setWaitDurationInOpenState(java.time.Duration waitDurationInOpenStateMillis)
Sets the wait duration the CircuitBreaker should stay open, before it switches to half
closed.
|
CircuitBreakerConfigurationProperties.InstanceProperties |
setWritableStackTraceEnabled(java.lang.Boolean writableStackTraceEnabled)
Sets if we should enable writable stack traces or not.
|
@Nullable public java.lang.Float getFailureRateThreshold()
public CircuitBreakerConfigurationProperties.InstanceProperties setFailureRateThreshold(java.lang.Float failureRateThreshold)
failureRateThreshold - the failure rate threshold@Nullable public java.time.Duration getWaitDurationInOpenState()
public CircuitBreakerConfigurationProperties.InstanceProperties setWaitDurationInOpenState(java.time.Duration waitDurationInOpenStateMillis)
waitDurationInOpenStateMillis - the wait duration@Nullable public java.lang.Integer getRingBufferSizeInClosedState()
@Deprecated public CircuitBreakerConfigurationProperties.InstanceProperties setRingBufferSizeInClosedState(java.lang.Integer ringBufferSizeInClosedState)
setSlidingWindowSize(Integer) instead.ringBufferSizeInClosedState - the ring buffer size@Nullable public java.lang.Integer getRingBufferSizeInHalfOpenState()
@Deprecated public CircuitBreakerConfigurationProperties.InstanceProperties setRingBufferSizeInHalfOpenState(java.lang.Integer ringBufferSizeInHalfOpenState)
setPermittedNumberOfCallsInHalfOpenState(Integer) instead.ringBufferSizeInHalfOpenState - the ring buffer sizepublic java.lang.Boolean getAutomaticTransitionFromOpenToHalfOpenEnabled()
public CircuitBreakerConfigurationProperties.InstanceProperties setAutomaticTransitionFromOpenToHalfOpenEnabled(java.lang.Boolean automaticTransitionFromOpenToHalfOpenEnabled)
automaticTransitionFromOpenToHalfOpenEnabled - The flag for automatic transition to
half open after the timer has run
out.@Nullable public java.lang.Boolean getWritableStackTraceEnabled()
public CircuitBreakerConfigurationProperties.InstanceProperties setWritableStackTraceEnabled(java.lang.Boolean writableStackTraceEnabled)
writableStackTraceEnabled - The flag to enable writable stack traces.@Nullable public java.lang.Integer getEventConsumerBufferSize()
public CircuitBreakerConfigurationProperties.InstanceProperties setEventConsumerBufferSize(java.lang.Integer eventConsumerBufferSize)
@Nullable public java.lang.Boolean getAllowHealthIndicatorToFail()
setAllowHealthIndicatorToFail(Boolean)public CircuitBreakerConfigurationProperties.InstanceProperties setAllowHealthIndicatorToFail(java.lang.Boolean allowHealthIndicatorToFail)
allowHealthIndicatorToFail - flag to control if the health indicator is allowed to
fail@Nullable public java.lang.Boolean getRegisterHealthIndicator()
public CircuitBreakerConfigurationProperties.InstanceProperties setRegisterHealthIndicator(java.lang.Boolean registerHealthIndicator)
@Nullable public java.lang.Class<java.util.function.Predicate<java.lang.Throwable>> getRecordFailurePredicate()
public CircuitBreakerConfigurationProperties.InstanceProperties setRecordFailurePredicate(java.lang.Class<java.util.function.Predicate<java.lang.Throwable>> recordFailurePredicate)
@Nullable public java.lang.Class<? extends java.lang.Throwable>[] getRecordExceptions()
public CircuitBreakerConfigurationProperties.InstanceProperties setRecordExceptions(java.lang.Class<? extends java.lang.Throwable>[] recordExceptions)
@Nullable public java.lang.Class<? extends java.lang.Throwable>[] getIgnoreExceptions()
public CircuitBreakerConfigurationProperties.InstanceProperties setIgnoreExceptions(java.lang.Class<? extends java.lang.Throwable>[] ignoreExceptions)
@Nullable public java.lang.String getBaseConfig()
public CircuitBreakerConfigurationProperties.InstanceProperties setBaseConfig(java.lang.String baseConfig)
baseConfig - The shared configuration name.@Nullable public java.lang.Integer getPermittedNumberOfCallsInHalfOpenState()
public void setPermittedNumberOfCallsInHalfOpenState(java.lang.Integer permittedNumberOfCallsInHalfOpenState)
@Nullable public java.lang.Integer getMinimumNumberOfCalls()
public void setMinimumNumberOfCalls(java.lang.Integer minimumNumberOfCalls)
@Nullable public java.lang.Integer getSlidingWindowSize()
public void setSlidingWindowSize(java.lang.Integer slidingWindowSize)
@Nullable public java.lang.Float getSlowCallRateThreshold()
public void setSlowCallRateThreshold(java.lang.Float slowCallRateThreshold)
@Nullable public java.time.Duration getSlowCallDurationThreshold()
public void setSlowCallDurationThreshold(java.time.Duration slowCallDurationThreshold)
@Nullable public io.github.resilience4j.circuitbreaker.CircuitBreakerConfig.SlidingWindowType getSlidingWindowType()
public void setSlidingWindowType(io.github.resilience4j.circuitbreaker.CircuitBreakerConfig.SlidingWindowType slidingWindowType)
public java.lang.Boolean getEnableExponentialBackoff()
public CircuitBreakerConfigurationProperties.InstanceProperties setEnableExponentialBackoff(java.lang.Boolean enableExponentialBackoff)
@Nullable public java.lang.Double getExponentialBackoffMultiplier()
public CircuitBreakerConfigurationProperties.InstanceProperties setExponentialBackoffMultiplier(java.lang.Double exponentialBackoffMultiplier)
@Nullable public java.lang.Boolean getEnableRandomizedWait()
public CircuitBreakerConfigurationProperties.InstanceProperties setEnableRandomizedWait(java.lang.Boolean enableRandomizedWait)
@Nullable public java.lang.Double getRandomizedWaitFactor()
public CircuitBreakerConfigurationProperties.InstanceProperties setRandomizedWaitFactor(java.lang.Double randomizedWaitFactor)