public abstract class ProcessUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
executeWithRetry(Runnable runnable,
Predicate<RuntimeException> retryPredicate,
long timeout,
TimeUnit timeUnit,
long retryInterval)
Executes an action, with potential retry in case of an exception.
|
public static void executeWithRetry(Runnable runnable, Predicate<RuntimeException> retryPredicate, long timeout, TimeUnit timeUnit, long retryInterval)
runnable
- action to executeretryPredicate
- predicate to determine if the action should be retried based on the exceptiontimeout
- timeout for the retriestimeUnit
- unit for the timeoutretryInterval
- time to wait between retries of the actionCopyright © 2010–2020. All rights reserved.