public static interface Retry.RetrySignal
Flux.retryWhen(Retry)
and Mono.retryWhen(Retry)
,
providing the Throwable
that caused the source to fail as well as counters keeping track of retries.限定符和类型 | 方法和说明 |
---|---|
default Retry.RetrySignal |
copy()
An immutable copy of this
Retry.RetrySignal which is guaranteed to give a consistent view
of the state at the time at which this method is invoked. |
java.lang.Throwable |
failure()
The
Throwable that caused the current onError signal. |
default ContextView |
retryContextView()
Return a read-only view of the user provided context, which may be used to store
objects to be reset/rolled-back or otherwise mutated before or after a retry.
|
long |
totalRetries()
The total number of retries since the source first was subscribed to (in other words the number of errors -1
since the source was first subscribed to).
|
long |
totalRetriesInARow()
Retry counter resetting after each
onNext (in other
words the number of errors -1 since the latest onNext ). |
long totalRetries()
long totalRetriesInARow()
onNext
(in other
words the number of errors -1 since the latest onNext
).onNext
,
or the number of retries since the source first was subscribed to if there hasn't been any
onNext
signals (in which case
totalRetries()
and totalRetriesInARow()
are equivalent).java.lang.Throwable failure()
Throwable
that caused the current onError
signal.default ContextView retryContextView()
default Retry.RetrySignal copy()
Retry.RetrySignal
which is guaranteed to give a consistent view
of the state at the time at which this method is invoked.
This is especially useful if this Retry.RetrySignal
is a transient view of the state of the underlying
retry subscriber.Retry.RetrySignal
, always safe to use