Class RetryOnExceptionsCondition

  • All Implemented Interfaces:
    RetryCondition

    public final class RetryOnExceptionsCondition
    extends Object
    implements RetryCondition
    Retry condition implementation that retries if the exception or the cause of the exception matches the classes defined.
    • Method Detail

      • shouldRetry

        public boolean shouldRetry​(RetryPolicyContext context)
        Description copied from interface: RetryCondition
        Determine whether a request should or should not be retried.
        Specified by:
        shouldRetry in interface RetryCondition
        Parameters:
        context - Context about the state of the last request and information about the number of requests made.
        Returns:
        True if the exception class or the cause of the exception matches one of the exceptions supplied at initialization time.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object