Interface RepeatContext<T>

Type Parameters:
T - Application context type
All Superinterfaces:
IterationContext<T>
All Known Implementing Classes:
DefaultContext

public interface RepeatContext<T> extends IterationContext<T>
Context provided to repeat predicate Repeat.onlyIf(java.util.function.Predicate) and the repeat callback Repeat.doOnRepeat(java.util.function.Consumer).
  • Method Details

    • companionValue

      Long companionValue()
      Returns the value provided in the companion Flux for repeats.
      • For Flux.repeatWhen(java.util.function.Function) and Mono.repeatWhen(java.util.function.Function), value is the number of items emitted in the last attempt.
      • For Mono.repeatWhenEmpty(java.util.function.Function) and Mono.repeatWhenEmpty(int, java.util.function.Function), value is a zero-based incrementing Long, which is number of attempts - 1.
      Returns:
      value the value emitted on the companion Flux for repeats.