Package com.oracle.bmc.retrier
Class RetryOnOpenCircuitBreakerDefaultRetryCondition
- java.lang.Object
-
- com.oracle.bmc.retrier.DefaultRetryCondition
-
- com.oracle.bmc.retrier.RetryOnOpenCircuitBreakerDefaultRetryCondition
-
- All Implemented Interfaces:
RetryCondition
public class RetryOnOpenCircuitBreakerDefaultRetryCondition extends DefaultRetryCondition
Class that may retry for the conditions documented in https://docs.oracle.com/iaas/Content/API/References/apierrors.htm and when the CircuitBreaker is OPEN.
-
-
Constructor Summary
Constructors Constructor Description RetryOnOpenCircuitBreakerDefaultRetryCondition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanshouldBeRetried(BmcException exception)Check if the operation should be retried based on the givenBmcException.-
Methods inherited from class com.oracle.bmc.retrier.DefaultRetryCondition
isProcessingException
-
-
-
-
Method Detail
-
shouldBeRetried
public boolean shouldBeRetried(@Nonnull BmcException exception)Description copied from class:DefaultRetryConditionCheck if the operation should be retried based on the givenBmcException.The operation will be retried if:
- The exception is client-side and not caused by a
CallNotAllowedException. - The exception is a timeout.
- The HTTP status code is 429, 500, 502, 503, or 504.
- The HTTP status code and service code are in the
DefaultRetryCondition.RETRYABLE_SERVICE_ERRORSmap. - The exception is a "processing exception" and token refresh retry is enabled.
- Specified by:
shouldBeRetriedin interfaceRetryCondition- Overrides:
shouldBeRetriedin classDefaultRetryCondition- Parameters:
exception- The exception from the previous unsuccessful operation.- Returns:
- true if the operation should be retried, else false.
- The exception is client-side and not caused by a
-
-