class BestEffortRetryStrategy implements RetryStrategy {

  @Override
  public CompletableFuture<RetryAction> shouldRetry(final Request<? extends Response> request, final RetryReason reason) {
    if (request.idempotent() || reason.allowsNonIdempotentRetry()) {
      RequestContext ctx = request.context();
      return CompletableFuture.completedFuture(RetryAction.withDuration(
        backoff.apply(new RetryStrategyIterationContext(ctx.retryAttempts(), ctx.lastRetryDuration())).delay()
      ));
    }
    return CompletableFuture.completedFuture(RetryAction.noRetry());
  }

  protected  BestEffortRetryStrategy();
  protected  BestEffortRetryStrategy(final Backoff backoff);

}