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.Modifier and Type | Method and Description |
---|---|
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. |
Throwable |
failure()
|
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()
|
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).Throwable failure()
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