public final class DelayUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Function<Flux<Long>,org.reactivestreams.Publisher<?>> |
exponentialBackOff(Duration minimum,
Duration maximum,
Duration timeout)
Implements an exponential backoff delay for use with
Mono.repeatWhenEmpty(Function) |
static Function<Flux<Throwable>,org.reactivestreams.Publisher<?>> |
exponentialBackOffError(Duration minimum,
Duration maximum,
Duration timeout)
Implements an exponential backoff delay for use with
Mono.retryWhen(Function) |
static Function<Flux<Long>,org.reactivestreams.Publisher<?>> |
fixed(Duration duration)
Implements an fixed delay for use with
Mono.repeatWhenEmpty(Function) |
static Function<Flux<Long>,org.reactivestreams.Publisher<?>> |
instant()
Implements an instant (no delay) for use with
Mono.repeatWhenEmpty(Function) |
public static Function<Flux<Long>,org.reactivestreams.Publisher<?>> exponentialBackOff(Duration minimum, Duration maximum, Duration timeout)
Mono.repeatWhenEmpty(Function)minimum - the minimum durationmaximum - the maximum durationtimeout - the maximum amount of time to delay forPublisherpublic static Function<Flux<Throwable>,org.reactivestreams.Publisher<?>> exponentialBackOffError(Duration minimum, Duration maximum, Duration timeout)
Mono.retryWhen(Function)minimum - the minimum durationmaximum - the maximum durationtimeout - the maximum amount of time to delay forPublisherpublic static Function<Flux<Long>,org.reactivestreams.Publisher<?>> fixed(Duration duration)
Mono.repeatWhenEmpty(Function)duration - the duration of the delayPublisherpublic static Function<Flux<Long>,org.reactivestreams.Publisher<?>> instant()
Mono.repeatWhenEmpty(Function)PublisherCopyright © 2020. All rights reserved.