程序包 | 说明 |
---|---|
reactor.util.retry |
限定符和类型 | 方法和说明 |
---|---|
RetrySpec |
RetrySpec.doAfterRetry(java.util.function.Consumer<Retry.RetrySignal> doAfterRetry)
Add synchronous behavior to be executed after the retry trigger is emitted in
the companion publisher.
|
RetrySpec |
RetrySpec.doAfterRetryAsync(java.util.function.Function<Retry.RetrySignal,Mono<java.lang.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(java.util.function.Consumer<Retry.RetrySignal> doBeforeRetry)
Add synchronous behavior to be executed before the retry trigger is emitted in
the companion publisher.
|
RetrySpec |
RetrySpec.doBeforeRetryAsync(java.util.function.Function<Retry.RetrySignal,Mono<java.lang.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(java.util.function.Predicate<? super java.lang.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. 1 meaning "1 retry attempt":
the original subscription plus an extra re-subscription in case of an error, but
no more.
|
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(java.util.function.Function<java.util.function.Predicate<java.lang.Throwable>,java.util.function.Predicate<? super java.lang.Throwable>> predicateAdjuster)
Allows to augment a previously
set Predicate with
a new condition to allow retries of some exception or not. |
RetrySpec |
RetrySpec.onRetryExhaustedThrow(java.util.function.BiFunction<RetrySpec,Retry.RetrySignal,java.lang.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. |
限定符和类型 | 方法和说明 |
---|---|
RetrySpec |
RetrySpec.onRetryExhaustedThrow(java.util.function.BiFunction<RetrySpec,Retry.RetrySignal,java.lang.Throwable> retryExhaustedGenerator)
Set the generator for the
Exception to be propagated when the maximum amount of retries
is exhausted. |