@ParametersAreNonnullByDefault public class RetryPolicy<T,C extends Callable<? extends T>> extends Object implements SyncRetryExecutor<T,C>
| Modifier and Type | Class and Description |
|---|---|
static class |
RetryPolicy.Builder<T,C extends Callable<? extends T>> |
| Modifier and Type | Method and Description |
|---|---|
AsyncRetryExecutor |
async() |
AsyncRetryExecutor<T,C> |
async(RetryExecutor exec) |
<R extends T,W extends C,EX extends Exception> |
call(W pwhat,
Class<EX> exceptionClass,
long startNanos,
long deadlineNanos) |
static <T,C extends Callable<? extends T>> |
defaultPolicy() |
RetryPredicate<T,C> |
getRetryPredicate(long startTimeNanos,
long deadlineNanos) |
static <T,C extends Callable<? extends T>> |
newBuilder()
Create a retry policy builder.
|
static <T,C extends Callable<? extends T>> |
noRetryPolicy() |
String |
toString() |
public static <T,C extends Callable<? extends T>> RetryPolicy<T,C> noRetryPolicy()
public static <T,C extends Callable<? extends T>> RetryPolicy<T,C> defaultPolicy()
public final <R extends T,W extends C,EX extends Exception> R call(W pwhat, Class<EX> exceptionClass, long startNanos, long deadlineNanos) throws InterruptedException, TimeoutException, EX extends Exception
call in interface SyncRetryExecutor<T,C extends Callable<? extends T>>InterruptedExceptionTimeoutExceptionEX extends Exceptionpublic final AsyncRetryExecutor<T,C> async(RetryExecutor exec)
public final AsyncRetryExecutor async()
public final RetryPredicate<T,C> getRetryPredicate(long startTimeNanos, long deadlineNanos)
public String toString()
@CheckReturnValue public static <T,C extends Callable<? extends T>> RetryPolicy.Builder<T,C> newBuilder()
T - the Type returned by the retried callables.C - the type of the Callable's returned.Copyright © 2018 SPF4J. All rights reserved.