code: @SuppressWarnings("unchecked")
    public static <T, X extends Exception> T retry(
        CheckedCallable<T, X> callable,
        BackOff backoff,
        RetryDeterminer<? super X> retryDet,
        Class<X> classType,
        Sleeper sleeper)
        throws X, InterruptedException {
      checkNotNull(backoff, "Must provide a non-null BackOff.");
      checkNotNull(retryDet, "Must provide a non-null RetryDeterminer.");
      checkNotNull(sleeper, "Must provide a non-null Sleeper.");
      checkNotNull(callable, "Must provide a non-null Executable object.");
  
      X currentException;
      do {
        try {
          return callable.call();
        } catch (Exception e) {
          if (classType.isInstance(e)) { // e is something that extends X
            currentException = (X) e;
            if (!retryDet.shouldRetry(currentException)) {
              throw currentException;
            }
          } else {
            if (e instanceof RuntimeException) {
              throw (RuntimeException) e;
            }
            throw new RuntimeException(
                "Retrying with unchecked exceptions that are not RuntimeExceptions is not supported.",
                e);
          }
        }
      } while (nextSleep(backoff, sleeper, currentException));
      throw currentException;
    }
docs: Retries the given executable function in the case of transient errors defined by the
  RetryDeterminer.
  
  <p>Does not support unchecked exceptions that are not instances of RuntimeException.
  
  @param callable CheckedCallable to retry execution of
  @param backoff BackOff to determine how long to sleep for
  @param retryDet RetryDeterminer to determine when to retry
  @param classType class type of X
  @param sleeper Used to sleep
  @param <T> Type of object returned by the call.
  @param <X> Type of exception thrown by the call.
  @throws X What is thrown from the executable or the RetryDeterminer
  @throws InterruptedException - Exception thrown from sleep