Package io.smallrye.mutiny.groups
Class MultiCreateBy
- java.lang.Object
-
- io.smallrye.mutiny.groups.MultiCreateBy
-
public class MultiCreateBy extends java.lang.Object
Allows the creation of instances ofMulti
by merging/combining/concatenating multiple upstreams.
-
-
Field Summary
Fields Modifier and Type Field Description static MultiCreateBy
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiItemCombination
combining()
MultiConcat
concatenating()
MultiMerge
merging()
MultiRepetition
repeating()
MultiReplay
replaying()
-
-
-
Field Detail
-
INSTANCE
public static final MultiCreateBy INSTANCE
-
-
Method Detail
-
concatenating
@CheckReturnValue public MultiConcat concatenating()
Creates a new instance ofMulti
by concatenating severalMulti
orPublisher
instances.The concatenation reads the streams in order and emits the items in order.
- Returns:
- the object to configure the concatenation
-
merging
@CheckReturnValue public MultiMerge merging()
Creates a new instance ofMulti
by merging severalMulti
orPublisher
instances.The concatenation reads the streams concurrently and emits the items as they come.
- Returns:
- the object to configure the merge
-
combining
@CheckReturnValue public MultiItemCombination combining()
Creates a new instance ofMulti
by associating / combining the items from different streams (Multi
orPublisher
).The resulting
Multi
can:- collects an item of every observed streams and combines them. If one of the observed stream sends the completion event, the event is propagated in the produced stream, and no other combination are emitted.
- as soon as on of the observed stream emits an item, it combines it with the latest items emitted by other stream. the completion event is sent when all the observed streams have completed (with a completion event).
The combination also allows to collect the failures and propagates a failure when all observed streams have completed (or failed) instead of propagating the failure immediately.
- Returns:
- the object to configure the combination
-
repeating
@CheckReturnValue public MultiRepetition repeating()
- Returns:
- the object to configure the repetition
-
replaying
@CheckReturnValue @Experimental("Replaying of Multi is an experimental feature in Mutiny 1.4.0") public MultiReplay replaying()
Creates a newMulti
that replays elements from anotherMulti
to any number of current and late subscribers.- Returns:
- the object to configure the replay behavior
-
-