Package | Description |
---|---|
reactor.util.retry |
Modifier and Type | Method and Description |
---|---|
static RetryBackoffSpec |
Retry.backoff(long maxAttempts,
Duration minBackoff)
A
RetryBackoffSpec preconfigured for exponential backoff strategy with jitter, given a maximum number of retry attempts
and a minimum Duration for the backoff. |
RetryBackoffSpec |
RetryBackoffSpec.doAfterRetry(Consumer<Retry.RetrySignal> doAfterRetry)
Add synchronous behavior to be executed after the retry trigger is emitted in
the companion publisher.
|
RetryBackoffSpec |
RetryBackoffSpec.doAfterRetryAsync(Function<Retry.RetrySignal,Mono<Void>> doAsyncAfterRetry)
Add asynchronous behavior to be executed after the current retry trigger in the companion publisher,
thus delaying the resulting retry trigger with the additional
Mono . |
RetryBackoffSpec |
RetryBackoffSpec.doBeforeRetry(Consumer<Retry.RetrySignal> doBeforeRetry)
Add synchronous behavior to be executed before the retry trigger is emitted in
the companion publisher.
|
RetryBackoffSpec |
RetryBackoffSpec.doBeforeRetryAsync(Function<Retry.RetrySignal,Mono<Void>> doAsyncBeforeRetry)
Add asynchronous behavior to be executed before the current retry trigger in the companion publisher,
thus delaying the resulting retry trigger with the additional
Mono . |
RetryBackoffSpec |
RetryBackoffSpec.filter(Predicate<? super Throwable> errorFilter)
Set the
Predicate that will filter which errors can be retried. |
static RetryBackoffSpec |
Retry.fixedDelay(long maxAttempts,
Duration fixedDelay)
A
RetryBackoffSpec preconfigured for fixed delays (min backoff equals max backoff, no jitter), given a maximum number of retry attempts
and the fixed Duration for the backoff. |
RetryBackoffSpec |
RetryBackoffSpec.jitter(double jitterFactor)
Set a jitter factor for exponential backoffs that adds randomness to each backoff.
|
RetryBackoffSpec |
RetryBackoffSpec.maxAttempts(long maxAttempts)
Set the maximum number of retry attempts allowed.
|
RetryBackoffSpec |
RetryBackoffSpec.maxBackoff(Duration maxBackoff)
Set a hard maximum
Duration for exponential backoffs. |
RetryBackoffSpec |
RetryBackoffSpec.minBackoff(Duration minBackoff)
Set the minimum
Duration for the first backoff. |
RetryBackoffSpec |
RetryBackoffSpec.modifyErrorFilter(Function<Predicate<Throwable>,Predicate<? super Throwable>> predicateAdjuster)
|
RetryBackoffSpec |
RetryBackoffSpec.onRetryExhaustedThrow(BiFunction<RetryBackoffSpec,Retry.RetrySignal,Throwable> retryExhaustedGenerator)
Set the generator for the
Exception to be propagated when the maximum amount of retries
is exhausted. |
RetryBackoffSpec |
RetryBackoffSpec.scheduler(Scheduler backoffScheduler)
Set a
Scheduler on which to execute the delays computed by the exponential backoff
strategy. |
RetryBackoffSpec |
RetryBackoffSpec.transientErrors(boolean isTransientErrors)
Set the transient error mode, indicating that the strategy being built should use
Retry.RetrySignal.totalRetriesInARow() rather than
Retry.RetrySignal.totalRetries() . |
RetryBackoffSpec |
RetryBackoffSpec.withRetryContext(ContextView retryContext)
Set the user provided
context that can be used to manipulate state on retries. |
Modifier and Type | Method and Description |
---|---|
RetryBackoffSpec |
RetryBackoffSpec.onRetryExhaustedThrow(BiFunction<RetryBackoffSpec,Retry.RetrySignal,Throwable> retryExhaustedGenerator)
Set the generator for the
Exception to be propagated when the maximum amount of retries
is exhausted. |