@ParametersAreNonnullByDefault @Beta @Deprecated public final class CallablesNano extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CallablesNano.NanoTimeoutCallable<T,EX extends Exception>
Deprecated.
|
static interface |
CallablesNano.TimeoutNanoRetryPredicate<T,R>
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static <T,EX extends Exception> |
executeWithRetry(CallablesNano.NanoTimeoutCallable<T,EX> what,
CallablesNano.TimeoutNanoRetryPredicate<Exception,T> retryOnException,
Class<EX> exceptionClass)
Deprecated.
|
static <T,EX extends Exception> |
executeWithRetry(CallablesNano.NanoTimeoutCallable<T,EX> what,
CallablesNano.TimeoutNanoRetryPredicate<T,T> retryOnReturnVal,
CallablesNano.TimeoutNanoRetryPredicate<Exception,T> retryOnException,
Class<EX> exceptionClass)
Deprecated.
|
static <T,EX extends Exception> |
executeWithRetry(CallablesNano.NanoTimeoutCallable<T,EX> what,
int nrImmediateRetries,
long maxRetryWaitNanos,
Callables.AdvancedRetryPredicate<Exception> retryOnException,
Class<EX> exceptionClass)
Deprecated.
|
static <T,EX extends Exception> |
executeWithRetry(CallablesNano.NanoTimeoutCallable<T,EX> what,
int nrImmediateRetries,
long maxWaitNanos,
CallablesNano.TimeoutNanoRetryPredicate<? super T,T> retryOnReturnVal,
Callables.AdvancedRetryPredicate<Exception> retryOnException,
Class<EX> exceptionClass)
Deprecated.
After the immediate retries are done, delayed retry with randomized Fibonacci values up to the specified max is
executed.
|
static <T,EX extends Exception> |
executeWithRetry(CallablesNano.NanoTimeoutCallable<T,EX> what,
int nrImmediateRetries,
long maxRetryWaitNanos,
Class<EX> exceptionClass)
Deprecated.
|
static long |
toDeadlineNanos(long timeoutNanos)
Deprecated.
|
public static <T,EX extends Exception> T executeWithRetry(CallablesNano.NanoTimeoutCallable<T,EX> what, int nrImmediateRetries, long maxRetryWaitNanos, Class<EX> exceptionClass) throws InterruptedException, EX extends Exception, TimeoutException
InterruptedExceptionEX extends ExceptionTimeoutExceptionpublic static <T,EX extends Exception> T executeWithRetry(CallablesNano.NanoTimeoutCallable<T,EX> what, int nrImmediateRetries, long maxRetryWaitNanos, Callables.AdvancedRetryPredicate<Exception> retryOnException, Class<EX> exceptionClass) throws InterruptedException, EX extends Exception, TimeoutException
InterruptedExceptionEX extends ExceptionTimeoutExceptionpublic static <T,EX extends Exception> T executeWithRetry(CallablesNano.NanoTimeoutCallable<T,EX> what, int nrImmediateRetries, long maxWaitNanos, CallablesNano.TimeoutNanoRetryPredicate<? super T,T> retryOnReturnVal, Callables.AdvancedRetryPredicate<Exception> retryOnException, Class<EX> exceptionClass) throws InterruptedException, EX extends Exception, TimeoutException
T - - the type returned by the Callable that is retried.EX - - the Exception thrown by the retried callable.what - - the callable to retry.nrImmediateRetries - - the number of immediate retries.maxWaitNanos - - maximum wait time in between retries.retryOnReturnVal - - predicate to control retry on return value;retryOnException - - predicate to retry on thrown exception.InterruptedException - - thrown if interrupted.EX - - the exception declared to be thrown by the callable.EX extends ExceptionTimeoutExceptionpublic static long toDeadlineNanos(long timeoutNanos)
public static <T,EX extends Exception> T executeWithRetry(CallablesNano.NanoTimeoutCallable<T,EX> what, CallablesNano.TimeoutNanoRetryPredicate<T,T> retryOnReturnVal, CallablesNano.TimeoutNanoRetryPredicate<Exception,T> retryOnException, Class<EX> exceptionClass) throws InterruptedException, EX extends Exception, TimeoutException
InterruptedExceptionEX extends ExceptionTimeoutExceptionpublic static <T,EX extends Exception> T executeWithRetry(CallablesNano.NanoTimeoutCallable<T,EX> what, CallablesNano.TimeoutNanoRetryPredicate<Exception,T> retryOnException, Class<EX> exceptionClass) throws InterruptedException, EX extends Exception, TimeoutException
InterruptedExceptionEX extends ExceptionTimeoutExceptionCopyright © 2018 SPF4J. All rights reserved.