public static RetryPolicy clientRetryPolicy()

in src/main/java/com/google/cloud/dfmetrics/utils/RetryUtil.java [38:50]


  public static <T> RetryPolicy<T> clientRetryPolicy() {
    return RetryPolicy.<T>builder()
        .handle(IOException.class, SocketTimeoutException.class)
        .handleIf(
            throwable ->
                throwable.getMessage() != null
                    && throwable.getMessage().contains("Server is not responding"))
        .withBackoff(
            Duration.ofMillis(DEFAULT_BACKOFF_START_DELAY_MILLIS),
            Duration.ofMillis(DEFAULT_BACKOFF_MAX_DELAY_MILLIS))
        .withMaxRetries(DEFAULT_MAX_RETRIES)
        .build();
  }