Class Retry<T>

java.lang.Object
com.landawn.abacus.util.Retry<T>
Type Parameters:
T -

public final class Retry<T> extends Object
Since:
0.8
Author:
Haiyang Li
  • Method Details

    • of

      public static Retry<Void> of(int retryTimes, long retryIntervallInMillis, Predicate<? super Exception> retryCondition)
      Parameters:
      retryTimes -
      retryIntervallInMillis -
      retryCondition -
      Returns:
    • of

      public static <R> Retry<R> of(int retryTimes, long retryIntervallInMillis, BiPredicate<? super R,? super Exception> retryCondition)
      Type Parameters:
      R -
      Parameters:
      retryTimes -
      retryIntervallInMillis -
      retryCondition -
      Returns:
    • run

      public void run(Throwables.Runnable<? extends Exception> cmd) throws Exception
      Parameters:
      cmd -
      Throws:
      Exception - the exception
    • call

      public T call(Callable<T> callable) throws Exception
      Parameters:
      callable -
      Returns:
      Throws:
      Exception - the exception