code: public <F extends Throwable> RetryPolicy<R> withDelayOn(DelayFunction<R, F> delayFunction, Class<F> failure) {
      withDelay(delayFunction);
      Assert.notNull(failure, "failure");
      this.delayFailure = failure;
      return this;
    }
docs: Sets the {@code delayFunction} that computes the next delay before retrying. Delays will only occur for failures
  that are assignable from the {@code failure}.
  
  @param delayFunction the function to use to compute the delay before a next attempt
  @param failure the execution failure that is expected in order to trigger the delay
  @param <F> failure type
  @throws NullPointerException if {@code delayFunction} or {@code failure} are null
  @see DelayFunction