code: public static <T extends Throwable> WaitStrategy exceptionWait(@Nonnull Class<T> exceptionClass,
                                                                     @Nonnull Function<T, Long> function) {
          Preconditions.checkNotNull(exceptionClass, "exceptionClass may not be null");
          Preconditions.checkNotNull(function, "function may not be null");
          return new ExceptionWaitStrategy<T>(exceptionClass, function);
      }
docs: Returns a strategy which sleeps for an amount of time based on the Exception that occurred. The
  {@code function} determines how the sleep time should be calculated for the given
  {@code exceptionClass}. If the exception does not match, a wait time of 0 is returned.
  
  @param function       function to calculate sleep time
  @param exceptionClass class to calculate sleep time from
  @return a wait strategy calculated from the failed attempt