public final class Retries<T> extends Object
Constructor and Description |
---|
Retries(long initialIntervalMs,
int maxAttempts,
double backoffFactor,
double jitter,
long maxIntervalMs,
Predicate<? super T> valueShouldRetry,
Predicate<? super Throwable> throwableShouldRetry) |
Modifier and Type | Method and Description |
---|---|
<S> S |
call(Callable<S> callable,
Predicate<? super S> valueShouldRetry) |
T |
call(Callable<T> callable) |
Retries<T> |
copy() |
static <T> Retries<T> |
create(Predicate<? super T> valueShouldRetry,
Predicate<? super Throwable> throwableShouldRetry) |
Retries<T> |
withBackoffFactor(double backoffFactor) |
Retries<T> |
withInitialIntervalMs(long initialIntervalMs) |
Retries<T> |
withJitter(double jitter) |
Retries<T> |
withMaxAttempts(int maxAttempts) |
Retries<T> |
withMaxIntervalMs(long maxIntervalMs) |
Retries<T> |
withThrowableShouldRetry(Predicate<? super Throwable> throwableShouldRetry) |
<S> Retries<S> |
withValueShouldRetry(Predicate<? super S> valueShouldRetry) |
public static <T> Retries<T> create(Predicate<? super T> valueShouldRetry, Predicate<? super Throwable> throwableShouldRetry)
public <S> Retries<S> withValueShouldRetry(Predicate<? super S> valueShouldRetry)
public Retries<T> withThrowableShouldRetry(Predicate<? super Throwable> throwableShouldRetry)
Copyright © 2021–2024. All rights reserved.