Package com.oracle.bmc.circuitbreaker
Class CircuitBreakerConfiguration
- java.lang.Object
- 
- com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration
 
- 
- Direct Known Subclasses:
- NoCircuitBreakerConfiguration
 
 public class CircuitBreakerConfiguration extends Object ACircuitBreakerConfigurationconfigures a circuit breakerSetting an invocation response timeout lower that the slow call threshold will bypass the intended effect of the circuit breaker 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classCircuitBreakerConfiguration.CircuitBreakerConfigurationBuilder
 - 
Field SummaryFields Modifier and Type Field Description static intBAD_GATEWAYstatic intDEFAULT_FAILURE_RATE_THRESHOLDstatic intDEFAULT_MINIMUM_NUMBER_OF_CALLSstatic intDEFAULT_PERMITTED_CALLS_IN_HALF_OPEN_STATEstatic intDEFAULT_SLIDING_WINDOW_SIZEstatic intDEFAULT_SLOW_CALL_DURATION_THRESHOLDstatic intDEFAULT_SLOW_CALL_RATE_THRESHOLDstatic intDEFAULT_WAIT_DURATION_IN_OPEN_STATEstatic booleanDEFAULT_WRITABLE_STACK_TRACE_ENABLEDstatic intGATEWAY_TIMEOUTstatic intINTERNAL_SERVER_ERRORstatic intNUMBER_OF_RECORDED_HISTORY_RESPONSESstatic intSERVICE_UNAVAILABLEstatic intTOO_MANY_REQUESTS
 - 
Constructor SummaryConstructors Modifier Constructor Description CircuitBreakerConfiguration()protectedCircuitBreakerConfiguration(int failureRateThreshold, int slowCallRateThreshold, Duration waitDurationInOpenState, int permittedNumberOfCallsInHalfOpenState, int minimumNumberOfCalls, int slidingWindowSize, Duration slowCallDurationThreshold, boolean writableStackTraceEnabled, Set<Integer> recordHttpStatuses, List<Class<? extends RuntimeException>> recordExceptions, boolean recordProcessingFailures)protectedCircuitBreakerConfiguration(int failureRateThreshold, int slowCallRateThreshold, Duration waitDurationInOpenState, int permittedNumberOfCallsInHalfOpenState, int minimumNumberOfCalls, int slidingWindowSize, Duration slowCallDurationThreshold, boolean writableStackTraceEnabled, Set<Integer> recordHttpStatuses, List<Class<? extends RuntimeException>> recordExceptions, boolean recordProcessingFailures, int numberOfRecordedHistoryResponses)Usebuilder()instead.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CircuitBreakerConfiguration.CircuitBreakerConfigurationBuilderbuilder()intgetFailureRateThreshold()intgetMinimumNumberOfCalls()intgetNumberOfRecordedHistoryResponses()intgetPermittedNumberOfCallsInHalfOpenState()List<Class<? extends RuntimeException>>getRecordExceptions()Set<Integer>getRecordHttpStatuses()intgetSlidingWindowSize()DurationgetSlowCallDurationThreshold()intgetSlowCallRateThreshold()DurationgetWaitDurationInOpenState()booleanisRecordProcessingFailures()booleanisWritableStackTraceEnabled()
 
- 
- 
- 
Field Detail- 
DEFAULT_FAILURE_RATE_THRESHOLDpublic static final int DEFAULT_FAILURE_RATE_THRESHOLD - See Also:
- Constant Field Values
 
 - 
DEFAULT_SLOW_CALL_RATE_THRESHOLDpublic static final int DEFAULT_SLOW_CALL_RATE_THRESHOLD - See Also:
- Constant Field Values
 
 - 
DEFAULT_WAIT_DURATION_IN_OPEN_STATEpublic static final int DEFAULT_WAIT_DURATION_IN_OPEN_STATE - See Also:
- Constant Field Values
 
 - 
DEFAULT_PERMITTED_CALLS_IN_HALF_OPEN_STATEpublic static final int DEFAULT_PERMITTED_CALLS_IN_HALF_OPEN_STATE - See Also:
- Constant Field Values
 
 - 
DEFAULT_MINIMUM_NUMBER_OF_CALLSpublic static final int DEFAULT_MINIMUM_NUMBER_OF_CALLS - See Also:
- Constant Field Values
 
 - 
DEFAULT_SLIDING_WINDOW_SIZEpublic static final int DEFAULT_SLIDING_WINDOW_SIZE - See Also:
- Constant Field Values
 
 - 
DEFAULT_SLOW_CALL_DURATION_THRESHOLDpublic static final int DEFAULT_SLOW_CALL_DURATION_THRESHOLD - See Also:
- Constant Field Values
 
 - 
DEFAULT_WRITABLE_STACK_TRACE_ENABLEDpublic static final boolean DEFAULT_WRITABLE_STACK_TRACE_ENABLED - See Also:
- Constant Field Values
 
 - 
NUMBER_OF_RECORDED_HISTORY_RESPONSESpublic static final int NUMBER_OF_RECORDED_HISTORY_RESPONSES - See Also:
- Constant Field Values
 
 - 
TOO_MANY_REQUESTSpublic static final int TOO_MANY_REQUESTS - See Also:
- Constant Field Values
 
 - 
INTERNAL_SERVER_ERRORpublic static final int INTERNAL_SERVER_ERROR - See Also:
- Constant Field Values
 
 - 
SERVICE_UNAVAILABLEpublic static final int SERVICE_UNAVAILABLE - See Also:
- Constant Field Values
 
 - 
BAD_GATEWAYpublic static final int BAD_GATEWAY - See Also:
- Constant Field Values
 
 - 
GATEWAY_TIMEOUTpublic static final int GATEWAY_TIMEOUT - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
CircuitBreakerConfigurationprotected CircuitBreakerConfiguration(int failureRateThreshold, int slowCallRateThreshold, Duration waitDurationInOpenState, int permittedNumberOfCallsInHalfOpenState, int minimumNumberOfCalls, int slidingWindowSize, Duration slowCallDurationThreshold, boolean writableStackTraceEnabled, Set<Integer> recordHttpStatuses, List<Class<? extends RuntimeException>> recordExceptions, boolean recordProcessingFailures)
 - 
CircuitBreakerConfiguration@ConstructorProperties({"failureRateThreshold","slowCallRateThreshold","waitDurationInOpenState","permittedNumberOfCallsInHalfOpenState","minimumNumberOfCalls","slidingWindowSize","slowCallDurationThreshold","writableStackTraceEnabled","recordHttpStatuses","recordExceptions","numberOfRecordedHistoryResponses"}) protected CircuitBreakerConfiguration(int failureRateThreshold, int slowCallRateThreshold, Duration waitDurationInOpenState, int permittedNumberOfCallsInHalfOpenState, int minimumNumberOfCalls, int slidingWindowSize, Duration slowCallDurationThreshold, boolean writableStackTraceEnabled, Set<Integer> recordHttpStatuses, List<Class<? extends RuntimeException>> recordExceptions, boolean recordProcessingFailures, int numberOfRecordedHistoryResponses) Usebuilder()instead.- Parameters:
- failureRateThreshold-
- slowCallRateThreshold-
- waitDurationInOpenState-
- permittedNumberOfCallsInHalfOpenState-
- minimumNumberOfCalls-
- slidingWindowSize-
- slowCallDurationThreshold-
- writableStackTraceEnabled-
- recordHttpStatuses-
- recordExceptions-
- recordProcessingFailures-
- numberOfRecordedHistoryResponses-
 
 - 
CircuitBreakerConfigurationpublic CircuitBreakerConfiguration() 
 
- 
 - 
Method Detail- 
builderpublic static CircuitBreakerConfiguration.CircuitBreakerConfigurationBuilder builder() 
 - 
getFailureRateThresholdpublic int getFailureRateThreshold() 
 - 
getSlowCallRateThresholdpublic int getSlowCallRateThreshold() 
 - 
getWaitDurationInOpenStatepublic Duration getWaitDurationInOpenState() 
 - 
getPermittedNumberOfCallsInHalfOpenStatepublic int getPermittedNumberOfCallsInHalfOpenState() 
 - 
getMinimumNumberOfCallspublic int getMinimumNumberOfCalls() 
 - 
getSlidingWindowSizepublic int getSlidingWindowSize() 
 - 
getSlowCallDurationThresholdpublic Duration getSlowCallDurationThreshold() 
 - 
isWritableStackTraceEnabledpublic boolean isWritableStackTraceEnabled() 
 - 
getNumberOfRecordedHistoryResponsespublic int getNumberOfRecordedHistoryResponses() 
 - 
getRecordExceptionspublic List<Class<? extends RuntimeException>> getRecordExceptions() 
 - 
isRecordProcessingFailurespublic boolean isRecordProcessingFailures() 
 
- 
 
-