public class AsyncRetryExecutor extends Object implements RetryExecutor
| Constructor and Description |
|---|
AsyncRetryExecutor(ScheduledExecutorService scheduler) |
AsyncRetryExecutor(ScheduledExecutorService scheduler,
Backoff backoff) |
AsyncRetryExecutor(ScheduledExecutorService scheduler,
RetryPolicy retryPolicy) |
AsyncRetryExecutor(ScheduledExecutorService scheduler,
RetryPolicy retryPolicy,
Backoff backoff) |
AsyncRetryExecutor(ScheduledExecutorService scheduler,
RetryPolicy retryPolicy,
Backoff backoff,
boolean fixedDelay) |
public AsyncRetryExecutor(ScheduledExecutorService scheduler)
public AsyncRetryExecutor(ScheduledExecutorService scheduler, Backoff backoff)
public AsyncRetryExecutor(ScheduledExecutorService scheduler, RetryPolicy retryPolicy)
public AsyncRetryExecutor(ScheduledExecutorService scheduler, RetryPolicy retryPolicy, Backoff backoff)
public AsyncRetryExecutor(ScheduledExecutorService scheduler, RetryPolicy retryPolicy, Backoff backoff, boolean fixedDelay)
public com.google.common.util.concurrent.ListenableFuture<Void> doWithRetry(RetryRunnable action)
doWithRetry in interface RetryExecutorpublic <V> com.google.common.util.concurrent.ListenableFuture<V> getWithRetry(Callable<V> task)
getWithRetry in interface RetryExecutorpublic <V> com.google.common.util.concurrent.ListenableFuture<V> getWithRetry(RetryCallable<V> task)
getWithRetry in interface RetryExecutorpublic <V> com.google.common.util.concurrent.ListenableFuture<V> getFutureWithRetry(RetryCallable<com.google.common.util.concurrent.ListenableFuture<V>> task)
getFutureWithRetry in interface RetryExecutorprotected <V> RetryJob<V> createTask(RetryCallable<V> function)
protected <V> RetryJob<V> createFutureTask(RetryCallable<com.google.common.util.concurrent.ListenableFuture<V>> function)
public ScheduledExecutorService getScheduler()
public boolean isFixedDelay()
public RetryPolicy getRetryPolicy()
public Backoff getBackoff()
public AsyncRetryExecutor withScheduler(ScheduledExecutorService scheduler)
public AsyncRetryExecutor withRetryPolicy(RetryPolicy retryPolicy)
public AsyncRetryExecutor withExponentialBackoff(long initialDelayMillis, double multiplier)
public AsyncRetryExecutor withFixedBackoff(long delayMillis)
public AsyncRetryExecutor withBackoff(Backoff backoff)
public AsyncRetryExecutor withFixedRate()
public AsyncRetryExecutor withFixedRate(boolean fixedDelay)
@SafeVarargs public final AsyncRetryExecutor retryOn(Class<? extends Throwable>... retryOnThrowables)
@SafeVarargs public final AsyncRetryExecutor abortOn(Class<? extends Throwable>... abortOnThrowable)
public AsyncRetryExecutor retryIf(com.google.common.base.Predicate<Throwable> retryPredicate)
public AsyncRetryExecutor abortIf(com.google.common.base.Predicate<Throwable> abortPredicate)
public AsyncRetryExecutor withUniformJitter()
public AsyncRetryExecutor withUniformJitter(long range)
public AsyncRetryExecutor withProportionalJitter()
public AsyncRetryExecutor withProportionalJitter(double multiplier)
public AsyncRetryExecutor withMinDelay(long minDelayMillis)
public AsyncRetryExecutor withMaxDelay(long maxDelayMillis)
public AsyncRetryExecutor withMaxRetries(int times)
public AsyncRetryExecutor dontRetry()
public AsyncRetryExecutor withNoDelay()
Copyright © 2014. All rights reserved.