@Test public void nonRetryableWrappedClientException_ReturnsFalse() { assertFalse(condition.shouldRetry(RetryPolicyContexts.withException(new SdkClientException(new ConnectException("foo"))))); }
@Override public boolean shouldRetry(RetryPolicyContext context) { if (context.exception() != null) { for (Class<? extends Exception> exceptionClass : exceptionsToRetryOn) { if (exceptionMatches(context, exceptionClass)) { return true; } if (wrappedCauseMatches(context, exceptionClass)) { return true; } } } return false; }
RetryOnExceptionsCondition implements RetryCondition { @Override public boolean shouldRetry(RetryPolicyContext context) { if (context.exception() != null) { for (Class<? extends Exception> exceptionClass : exceptionsToRetryOn) { if (exceptionMatches(context, exceptionClass)) { return true; } if (wrappedCauseMatches(context, exceptionClass)) { return true; } } } return false; } }
RetryOnExceptionsCondition implements RetryCondition { @Override public boolean shouldRetry(RetryPolicyContext context) { if (context.exception() != null) { for (Class<? extends Exception> exceptionClass : exceptionsToRetryOn) { if (exceptionMatches(context, exceptionClass)) { return true; } if (wrappedCauseMatches(context, exceptionClass)) { return true; } } } return false; } RetryOnExceptionsCondition(List<Class<? extends Exception>> exceptionsToRetryOn); }
RetryOnExceptionsCondition implements RetryCondition { @Override public boolean shouldRetry(RetryPolicyContext context) { if (context.exception() != null) { for (Class<? extends Exception> exceptionClass : exceptionsToRetryOn) { if (exceptionMatches(context, exceptionClass)) { return true; } if (wrappedCauseMatches(context, exceptionClass)) { return true; } } } return false; } RetryOnExceptionsCondition(List<Class<? extends Exception>> exceptionsToRetryOn); @Override boolean shouldRetry(RetryPolicyContext context); }
RetryOnExceptionsCondition implements RetryCondition { @Override public boolean shouldRetry(RetryPolicyContext context) { if (context.exception() != null) { for (Class<? extends Exception> exceptionClass : exceptionsToRetryOn) { if (exceptionMatches(context, exceptionClass)) { return true; } if (wrappedCauseMatches(context, exceptionClass)) { return true; } } } return false; } RetryOnExceptionsCondition(List<Class<? extends Exception>> exceptionsToRetryOn); @Override boolean shouldRetry(RetryPolicyContext context);  }