Package com.landawn.abacus.util
Class Retry<T>
java.lang.Object
com.landawn.abacus.util.Retry<T>
- Type Parameters:
T
-
- Since:
- 0.8
- Author:
- Haiyang Li
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <R> Retry<R>
of
(int retryTimes, long retryInterval, BiPredicate<? super R, ? super Exception> retryCondition) void
run
(Throwables.Runnable<? extends Exception> cmd)
-
Method Details
-
of
public static Retry<Void> of(int retryTimes, long retryInterval, Predicate<? super Exception> retryCondition) - Parameters:
retryTimes
-retryInterval
-retryCondition
-- Returns:
-
of
public static <R> Retry<R> of(int retryTimes, long retryInterval, BiPredicate<? super R, ? super Exception> retryCondition) - Type Parameters:
R
-- Parameters:
retryTimes
-retryInterval
-retryCondition
-- Returns:
-
run
- Parameters:
cmd
-- Throws:
Exception
- the exception
-
call
- Parameters:
callable
-- Returns:
- Throws:
Exception
- the exception
-