class CounterBasedRetryCondition implements RetryCondition {

  @Override
  public boolean shouldRetry(
      AmazonWebServiceRequest originalRequest,
      AmazonClientException exception,
      int retriesAttempted) {
    LOG.debug("Exception caught during upload, retries attempted = {} out of {}", retriesAttempted, maxErrorRetry,
        exception);
    return retriesAttempted <= maxErrorRetry;
  }

    CounterBasedRetryCondition(int maxErrorRetry);

}