code: public void awaitNextRetry() throws InterruptedException, NoMoreRetriesException {
      this.retryNumber++;
      if (this.retryNumber > this.maxRetries) {
        throw new NoMoreRetriesException("Reached maximum number of retries: " + this.maxRetries);
      } else if (this.totalWait > this.maxWait) {
        throw new NoMoreRetriesException("Reached maximum time to wait: " + this.maxWait);
      }
      Thread.sleep(this.nextDelay);
      this.totalWait += this.nextDelay;
      this.nextDelay = Math.min((long) (this.alpha * this.nextDelay) + 1, this.maxDelay);
    }
docs: Block until next retry can be executed.
  
  This method throws an exception if the max number of retries has been reached. For an alternative see
  {@link #awaitNextRetryIfAvailable()}.
  
  @throws NoMoreRetriesException If maximum number of retries has been reached.