T - the type of itempublic class UniRepeat<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
Multi<T> |
atMost(long times)
Generates a stream, containing the items from the upstream
Uni, resubscribed at most times times. |
Multi<T> |
indefinitely()
Generates an unbounded stream, indefinitely resubscribing to the
Uni. |
Multi<T> |
until(Predicate<T> predicate)
Generates a stream, containing the items from the upstream
Uni, resubscribed until the given predicate
returns true. |
public Multi<T> indefinitely()
Uni.
Note that this enforces:
The produced Multi contains the items emitted by the upstream Uni. After every emission,
another subscription is performed on the Uni, and the item is then propagated. If the Uni
fires a failure, the failure is propagated. If the Uni fires an empty items, it resubscribes.
public Multi<T> atMost(long times)
Uni, resubscribed at most times times.
Note that this enforces:
The produced Multi contains the items emitted by the upstream Uni. After every emission,
another subscription is performed on the Uni, and the item is then propagated. If the Uni
fires a failure, the failure is propagated. If the Uni fires an empty items, it resubscribes.
This method is named atMost because the repeating re-subscription can be stopped if the subscriber
cancels its subscription to the produced Multi.
times - the number of re-subscription, must be strictly positive, 1 is equivalent to Uni.toMulti()Multi containing the items from the upstream Uni, resubscribed at most times
times.Copyright © 2019–2020 SmallRye. All rights reserved.