Class 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 Detail

      • RetryOnOpenCircuitBreakerDefaultRetryCondition

        public RetryOnOpenCircuitBreakerDefaultRetryCondition()
    • Method Detail

      • shouldBeRetried

        public boolean shouldBeRetried​(@Nonnull
                                       BmcException exception)
        Description copied from class: DefaultRetryCondition
        Check if the operation should be retried based on the given BmcException.

        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_ERRORS map.
        • The exception is a "processing exception" and token refresh retry is enabled.
        Specified by:
        shouldBeRetried in interface RetryCondition
        Overrides:
        shouldBeRetried in class DefaultRetryCondition
        Parameters:
        exception - The exception from the previous unsuccessful operation.
        Returns:
        true if the operation should be retried, else false.