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