Package | Description |
---|---|
reactor.util.retry |
Modifier and Type | Method and Description |
---|---|
RetrySpec |
RetrySpec.doAfterRetry(Consumer<Retry.RetrySignal> doAfterRetry)
Add synchronous behavior to be executed after the retry trigger is emitted in
the companion publisher.
|
RetrySpec |
RetrySpec.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 . |
RetrySpec |
RetrySpec.doBeforeRetry(Consumer<Retry.RetrySignal> doBeforeRetry)
Add synchronous behavior to be executed before the retry trigger is emitted in
the companion publisher.
|
RetrySpec |
RetrySpec.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 . |
RetrySpec |
RetrySpec.filter(Predicate<? super Throwable> errorFilter)
Set the
Predicate that will filter which errors can be retried. |
static RetrySpec |
Retry.indefinitely()
A
RetrySpec preconfigured for the most simplistic retry strategy: retry immediately and indefinitely
(similar to Flux.retry() ). |
static RetrySpec |
Retry.max(long max)
A
RetrySpec preconfigured for a simple strategy with maximum number of retry attempts. |
RetrySpec |
RetrySpec.maxAttempts(long maxAttempts)
Set the maximum number of retry attempts allowed.
|
static RetrySpec |
Retry.maxInARow(long maxInARow)
A
RetrySpec preconfigured for a simple strategy with maximum number of retry attempts over
subsequent transient errors. |
RetrySpec |
RetrySpec.modifyErrorFilter(Function<Predicate<Throwable>,Predicate<? super Throwable>> predicateAdjuster)
|
RetrySpec |
RetrySpec.onRetryExhaustedThrow(BiFunction<RetrySpec,Retry.RetrySignal,Throwable> retryExhaustedGenerator)
Set the generator for the
Exception to be propagated when the maximum amount of retries
is exhausted. |
RetrySpec |
RetrySpec.transientErrors(boolean isTransientErrors)
Set the transient error mode, indicating that the strategy being built should use
Retry.RetrySignal.totalRetriesInARow() rather than
Retry.RetrySignal.totalRetries() . |
RetrySpec |
RetrySpec.withRetryContext(ContextView retryContext)
Set the user provided
context that can be used to manipulate state on retries. |
Modifier and Type | Method and Description |
---|---|
RetrySpec |
RetrySpec.onRetryExhaustedThrow(BiFunction<RetrySpec,Retry.RetrySignal,Throwable> retryExhaustedGenerator)
Set the generator for the
Exception to be propagated when the maximum amount of retries
is exhausted. |