T
- Application context typepublic interface IterationContext<T>
Modifier and Type | Method and Description |
---|---|
T |
applicationContext()
Application context that may be used to perform any rollbacks before
a retry.
|
Duration |
backoff()
The backoff delay.
|
long |
iteration()
The next iteration number.
|
T applicationContext()
Retry.withApplicationContext(Object)
or Repeat.withApplicationContext(Object)
.long iteration()
Duration backoff()
Backoff
function is invoked, the previous
backoff is provided in the context. The context provided for the retry
predicates Retry.onlyIf(java.util.function.Predicate)
and
Repeat.onlyIf(java.util.function.Predicate)
as well as the retry
callbacks Retry.doOnRetry(java.util.function.Consumer)
and
Repeat.doOnRepeat(java.util.function.Consumer)
provide the
backoff delay for the next retry.