@ParametersAreNonnullByDefault public final class Callables extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Callables.AdvancedAction
Deprecated.
use RetryPolicy
|
static interface |
Callables.AdvancedRetryPredicate<T>
Deprecated.
use RetryPolicy
|
static interface |
Callables.CheckedCallable<T,EX extends Exception>
A callable that will be retried.
|
static class |
Callables.FibonacciBackoffRetryPredicate<T,R>
Deprecated.
use RetryPolicy
|
static class |
Callables.RetryDecision<R>
Deprecated.
use RetryPolicy
|
static interface |
Callables.RetryPredicate<T,R>
Deprecated.
use RetryPolicy
|
static class |
Callables.SimpleAction
Deprecated.
use RetryPolicy
|
static interface |
Callables.SimpleRetryPredicate<T>
Deprecated.
use RetryPolicy
|
static class |
Callables.TimeoutCallable<T,EX extends Exception>
Deprecated.
use RetryPolicy
|
static interface |
Callables.TimeoutRetryPredicate<T,R>
Deprecated.
use RetryPolicy
|
| Modifier and Type | Field and Description |
|---|---|
static Callables.AdvancedRetryPredicate<Exception> |
DEFAULT_EXCEPTION_RETRY
Deprecated.
use RetryPolicy
|
static Predicate<Exception> |
DEFAULT_EXCEPTION_RETRY_PREDICATE
Deprecated.
use RetryPolicy
|
static Callables.SimpleRetryPredicate<?> |
RETRY_FOR_NULL_RESULT
Deprecated.
use RetryPolicy
|
| Modifier and Type | Method and Description |
|---|---|
static <V> Callable<V> |
constant(V value) |
static <T,EX extends Exception> |
executeWithRetry(Callables.CheckedCallable<T,EX> pwhat,
Callables.RetryPredicate<? super T,T> retryOnReturnVal,
Callables.RetryPredicate<Exception,T> retryOnException,
Class<EX> exceptionClass)
Deprecated.
use RetryPolicy
|
static <T,EX extends Exception> |
executeWithRetry(Callables.TimeoutCallable<T,EX> what,
Callables.TimeoutRetryPredicate<? super T,T> retryOnReturnVal,
Callables.TimeoutRetryPredicate<Exception,T> retryOnException,
Class<EX> exceptionClass)
Deprecated.
use RetryPolicy
|
static <T,EX extends Exception> |
executeWithRetry(Callables.TimeoutCallable<T,EX> what,
Callables.TimeoutRetryPredicate<Exception,T> retryOnException,
Class<EX> exceptionClass)
Deprecated.
use RetryPolicy
|
static <T,EX extends Exception> |
executeWithRetry(Callables.TimeoutCallable<T,EX> what,
int nrImmediateRetries,
int maxRetryWaitMillis,
Callables.AdvancedRetryPredicate<Exception> retryOnException,
Class<EX> exceptionClass)
Deprecated.
use RetryPolicy
|
static <T,EX extends Exception> |
executeWithRetry(Callables.TimeoutCallable<T,EX> what,
int nrImmediateRetries,
int maxWaitMillis,
Callables.TimeoutRetryPredicate<? super T,T> retryOnReturnVal,
Callables.AdvancedRetryPredicate<Exception> retryOnException,
Class<EX> exceptionClass)
Deprecated.
use RetryPolicy
|
static <T,EX extends Exception> |
executeWithRetry(Callables.TimeoutCallable<T,EX> what,
int nrImmediateRetries,
int maxRetryWaitMillis,
Class<EX> exceptionClass)
Deprecated.
use RetryPolicy
|
static <T> T |
executeWithRetry(Callables.TimeoutCallable<T,RuntimeException> what,
int nrImmediateRetries,
int maxRetryWaitMillis)
Deprecated.
use RetryPolicy
|
static <T> T |
executeWithRetry(Callables.TimeoutCallable<T,RuntimeException> what,
int nrImmediateRetries,
int maxRetryWaitMillis,
Callables.AdvancedRetryPredicate<Exception> retryOnException)
Deprecated.
use RetryPolicy
|
static Callable<Void> |
from(Runnable value) |
static <V> Callable<V> |
memorized(Callable<V> source) |
static Class |
rootClass(Exception f)
Deprecated.
use RetryPolicy
|
static <T> Callable<T> |
synchronize(Callable<T> callable) |
static <T> Callable<T> |
withName(Callable<T> callable,
String name)
This is a duplicate of guava Callables.threadRenaming ...
|
@Deprecated public static final Callables.SimpleRetryPredicate<?> RETRY_FOR_NULL_RESULT
@Deprecated public static final Callables.AdvancedRetryPredicate<Exception> DEFAULT_EXCEPTION_RETRY
@Deprecated public static final Predicate<Exception> DEFAULT_EXCEPTION_RETRY_PREDICATE
@Deprecated @Nullable public static <T,EX extends Exception> T executeWithRetry(Callables.TimeoutCallable<T,EX> what, int nrImmediateRetries, int maxRetryWaitMillis, Class<EX> exceptionClass) throws InterruptedException, EX extends Exception, TimeoutException
InterruptedExceptionEX extends ExceptionTimeoutException@Deprecated @Nullable public static <T> T executeWithRetry(Callables.TimeoutCallable<T,RuntimeException> what, int nrImmediateRetries, int maxRetryWaitMillis) throws InterruptedException, TimeoutException
InterruptedExceptionTimeoutException@Deprecated @Nullable public static <T,EX extends Exception> T executeWithRetry(Callables.TimeoutCallable<T,EX> what, int nrImmediateRetries, int maxRetryWaitMillis, Callables.AdvancedRetryPredicate<Exception> retryOnException, Class<EX> exceptionClass) throws InterruptedException, EX extends Exception, TimeoutException
InterruptedExceptionEX extends ExceptionTimeoutException@Deprecated @Nullable public static <T> T executeWithRetry(Callables.TimeoutCallable<T,RuntimeException> what, int nrImmediateRetries, int maxRetryWaitMillis, Callables.AdvancedRetryPredicate<Exception> retryOnException) throws InterruptedException, TimeoutException
InterruptedExceptionTimeoutException@Deprecated @Nullable public static <T,EX extends Exception> T executeWithRetry(Callables.TimeoutCallable<T,EX> what, int nrImmediateRetries, int maxWaitMillis, Callables.TimeoutRetryPredicate<? 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.maxWaitMillis - - 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 ExceptionTimeoutException@Deprecated public static Class rootClass(Exception f)
@Deprecated @Nullable public static <T,EX extends Exception> T executeWithRetry(Callables.TimeoutCallable<T,EX> what, Callables.TimeoutRetryPredicate<? super T,T> retryOnReturnVal, Callables.TimeoutRetryPredicate<Exception,T> retryOnException, Class<EX> exceptionClass) throws InterruptedException, EX extends Exception, TimeoutException
InterruptedExceptionEX extends ExceptionTimeoutException@Deprecated @Nullable public static <T,EX extends Exception> T executeWithRetry(Callables.TimeoutCallable<T,EX> what, Callables.TimeoutRetryPredicate<Exception,T> retryOnException, Class<EX> exceptionClass) throws InterruptedException, EX extends Exception, TimeoutException
InterruptedExceptionEX extends ExceptionTimeoutException@Deprecated @Nullable public static <T,EX extends Exception> T executeWithRetry(Callables.CheckedCallable<T,EX> pwhat, Callables.RetryPredicate<? super T,T> retryOnReturnVal, Callables.RetryPredicate<Exception,T> retryOnException, Class<EX> exceptionClass) throws InterruptedException, TimeoutException, EX extends Exception
T - - The type of callable to retry result;EX - - the exception thrown by the callable to retry.pwhat - - the callable to retry.retryOnReturnVal - - the predicate to control retry on return value.retryOnException - - the predicate to return on retry value.InterruptedException - - thrown if retry interrupted.EX - - the exception thrown by callable.TimeoutExceptionEX extends Exceptionpublic static <T> Callable<T> withName(Callable<T> callable, String name)
public static <V> Callable<V> constant(V value)
Copyright © 2018 SPF4J. All rights reserved.