Class MultiCreateBy


  • public class MultiCreateBy
    extends java.lang.Object
    Allows the creation of instances of Multi by merging/combining/concatenating multiple upstreams.
    • Method Detail

      • concatenating

        @CheckReturnValue
        public MultiConcat concatenating()
        Creates a new instance of Multi by concatenating several Multi or Publisher 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 of Multi by merging several Multi or Publisher 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 of Multi by associating / combining the items from different streams (Multi or Publisher).

        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()
        Creates a new Multi by repeating a given function producing unis or Completion Stages.
        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 new Multi that replays elements from another Multi to any number of current and late subscribers.
        Returns:
        the object to configure the replay behavior