@Test public void defaultRetriesCorrectly() throws Exception { assertThat(RetryDeterminer.DEFAULT.shouldRetry(new SocketTimeoutException())).isTrue(); assertThat( RetryDeterminer.SOCKET_ERRORS.shouldRetry( new SSLException("test", new SocketException()))) .isTrue(); assertThat(RetryDeterminer.SOCKET_ERRORS.shouldRetry(new SSLException("invalid certificate"))) .isFalse(); assertThat(RetryDeterminer.DEFAULT.shouldRetry(new IllegalArgumentException())).isFalse(); assertThat(RetryDeterminer.DEFAULT.shouldRetry(new InterruptedException())).isFalse(); assertThat(RetryDeterminer.DEFAULT.shouldRetry(makeHttpException(300))).isFalse(); assertThat(RetryDeterminer.DEFAULT.shouldRetry(makeHttpException(504))).isTrue(); assertThat(RetryDeterminer.DEFAULT.shouldRetry(makeHttpException(500))).isTrue(); assertThat(RetryDeterminer.DEFAULT.shouldRetry(makeHttpException(599))).isTrue(); assertThat(RetryDeterminer.DEFAULT.shouldRetry(makeHttpException(499))).isFalse(); }
public abstract boolean shouldRetry(X e);
RetryDeterminer { public abstract boolean shouldRetry(X e); }
RetryDeterminer { public abstract boolean shouldRetry(X e);  }
RetryDeterminer { public abstract boolean shouldRetry(X e);  abstract boolean shouldRetry(X e); static RetryDeterminer<IOException> createRateLimitedRetryDeterminer(
      final ApiErrorExtractor errorExtractor); }
RetryDeterminer { public abstract boolean shouldRetry(X e);  abstract boolean shouldRetry(X e); static RetryDeterminer<IOException> createRateLimitedRetryDeterminer(
      final ApiErrorExtractor errorExtractor); static final RetryDeterminer<Exception> DEFAULT; static final RetryDeterminer<IOException> SOCKET_ERRORS; static final RetryDeterminer<IOException> SERVER_ERRORS; static final RetryDeterminer<IOException> RATE_LIMIT_ERRORS; }