T - the type of itempublic class UniOnItemDelay<T> extends Object
Uni to its downstream.| Constructor and Description |
|---|
UniOnItemDelay(Uni<T> upstream,
ScheduledExecutorService executor)
Creates a new
UniOnItemDelay instance. |
| Modifier and Type | Method and Description |
|---|---|
Uni<T> |
by(Duration duration)
Delays the item emission by a specific duration.
|
UniOnItemDelay<T> |
onExecutor(ScheduledExecutorService executor)
Configures the executor which is used to wait for the delay duration.
|
Uni<T> |
until(Function<? super T,? extends Uni<?>> function)
|
public UniOnItemDelay(Uni<T> upstream, ScheduledExecutorService executor)
UniOnItemDelay instance.upstream - the upstream uniexecutor - the executor, can be null, if null used the default worker executor.public UniOnItemDelay<T> onExecutor(ScheduledExecutorService executor)
executor - the executor, must not be nullUniOnItemDelay.public Uni<T> by(Duration duration)
duration - the duration of the delay, must not be null, must be strictly positive.Unipublic Uni<T> until(Function<? super T,? extends Uni<?>> function)
Uni produced by the given Function emits an item
(potentially null)
When the upstream emits its item, the passed function is called. The returned Uni is subscribed using the configured executor. Once this Uni emits its item, the item emitted by upstream is propagated downstream. If the Uni fails, the failure is propagated instead.
function - the function, must not be nullUni.Copyright © 2019–2020 SmallRye. All rights reserved.