Package io.smallrye.mutiny.groups
Class MultiItemCombine3<T1,T2,T3>
- java.lang.Object
-
- io.smallrye.mutiny.groups.MultiItemCombineIterable
-
- io.smallrye.mutiny.groups.MultiItemCombine3<T1,T2,T3>
-
public class MultiItemCombine3<T1,T2,T3> extends MultiItemCombineIterable
-
-
Constructor Summary
Constructors Constructor Description MultiItemCombine3(java.lang.Iterable<org.reactivestreams.Publisher<?>> iterable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Multi<Tuple3<T1,T2,T3>>
asTuple()
MultiItemCombine3<T1,T2,T3>
collectFailures()
Configures the combination to wait until all thestreams
to fire a completion or failure event before propagating a failure downstream.MultiItemCombine3<T1,T2,T3>
latestItems()
By default, the combination logic is called with one item of each observed stream.<O> Multi<O>
using(Functions.Function3<T1,T2,T3,O> combinator)
Creates the resultingMulti
.-
Methods inherited from class io.smallrye.mutiny.groups.MultiItemCombineIterable
using
-
-
-
-
Method Detail
-
collectFailures
@CheckReturnValue public MultiItemCombine3<T1,T2,T3> collectFailures()
Configures the combination to wait until all thestreams
to fire a completion or failure event before propagating a failure downstream.- Overrides:
collectFailures
in classMultiItemCombineIterable
- Returns:
- the current
MultiItemCombine3
-
latestItems
@CheckReturnValue public MultiItemCombine3<T1,T2,T3> 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.
- Overrides:
latestItems
in classMultiItemCombineIterable
- Returns:
- the current
MultiItemCombine3
-
asTuple
@CheckReturnValue public Multi<Tuple3<T1,T2,T3>> asTuple()
- Returns:
- the resulting
Multi
. The items are combined into aTuple3<T1, T2, T3>
.
-
using
@CheckReturnValue public <O> Multi<O> using(Functions.Function3<T1,T2,T3,O> combinator)
Creates the resultingMulti
. The items are combined using the given combinator function.- Type Parameters:
O
- the type of item- Parameters:
combinator
- the combinator function, must not benull
- Returns:
- the resulting
Multi
.
-
-