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. |
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.
|
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 useThrowable failure()
Throwable
that needs to be evaluated for retry.Throwable
long totalRetries()
long totalRetriesInARow()
onNext
.