public static interface Retry.RetrySignal
Flux.retryWhen(Retry)
Flux retry} or Mono retry
.
A flux of states is passed to the user, which gives information about the failure()
that potentially triggers
a retry as well as two indexes: the number of errors that happened so far (and were retried) and the same number,
but only taking into account subsequent errors (see totalRetriesInARow()
).Modifier and Type | Method and Description |
---|---|
default Retry.RetrySignal |
copy()
Return 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()
The current
Throwable that needs to be evaluated for retry. |
default ContextView |
retryContextView()
Return a read-only view of the user provided context, which may be used to store
objects to be reset/rollbacked or otherwise mutated before or after a retry.
|
long |
totalRetries()
The ZERO BASED index number of this error (can also be read as how many retries have occurred
so far), since the source was first subscribed to.
|
long |
totalRetriesInARow()
The ZERO BASED index number of this error since the beginning of the current burst of errors.
|
long totalRetries()
long totalRetriesInARow()
onNext
.Throwable failure()
Throwable
that needs to be evaluated for retry.Throwable
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