- java.lang.Object
-
- io.smallrye.mutiny.groups.MultiItemCombineIterable
-
- Direct Known Subclasses:
MultiItemCombine2
,MultiItemCombine3
,MultiItemCombine4
,MultiItemCombine5
,MultiItemCombine6
,MultiItemCombine7
,MultiItemCombine8
,MultiItemCombine9
public class MultiItemCombineIterable extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MultiItemCombineIterable(java.lang.Iterable<? extends java.util.concurrent.Flow.Publisher<?>> iterable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiItemCombineIterable
collectFailures()
Configures the combination to wait until all thestreams
to fire a completion or failure event before propagating a failure downstream.MultiItemCombineIterable
latestItems()
By default, the combination logic is called with one item of each observed stream.<O> Multi<O>
using(java.util.function.Function<java.util.List<?>,O> combinator)
Sets the combination logic as parameter and returns aMulti
associating the items from the observed stream using this combinator.
-
-
-
Method Detail
-
collectFailures
@CheckReturnValue public MultiItemCombineIterable collectFailures()
Configures the combination to wait until all thestreams
to fire a completion or failure event before propagating a failure downstream.- Returns:
- the current
MultiItemCombineIterable
-
latestItems
@CheckReturnValue public MultiItemCombineIterable latestItems()
By default, the combination logic is called with one item of each observed stream. It waits until all the upstreams emit an item, and it invokes the combination logic. In other words, it associated the items from different streams having the same index. If one of the streams completes, the produced stream also completes.With this method, you can change this behavior and call the combination logic when one of the observed streams emits an item. It calls the combination logic with this new item and the latest items emitted by the other streams.
It waits until all the streams have emitted at least one item before calling the combination logic. If one of the streams completes before emitting a value, the produced stream also completes without emitting an item.
- Returns:
- the current
MultiItemCombineIterable
-
-