Class MultiItemCombination

java.lang.Object
io.smallrye.mutiny.groups.MultiItemCombination

public class MultiItemCombination extends Object
  • Constructor Details

    • MultiItemCombination

      public MultiItemCombination()
  • Method Details

    • streams

      @CheckReturnValue public <T1, T2> MultiItemCombine2<T1,T2> streams(Flow.Publisher<? extends T1> a, Flow.Publisher<? extends T2> b)
      Combines the items from 2 streams.
      Type Parameters:
      T1 - the type of item from the first stream
      T2 - the type of item from the second stream
      Parameters:
      a - the first stream, must not be null
      b - the second stream, must not be null
      Returns:
      the object to configure the combination process
    • streams

      @CheckReturnValue public <T1, T2, T3> MultiItemCombine3<T1,T2,T3> streams(Flow.Publisher<? extends T1> a, Flow.Publisher<? extends T2> b, Flow.Publisher<? extends T3> c)
      Combines the items from 3 streams.
      Type Parameters:
      T1 - the type of item from the first stream
      T2 - the type of item from the second stream
      T3 - the type of item from the third stream
      Parameters:
      a - the first stream, must not be null
      b - the second stream, must not be null
      c - the third stream, must not be null
      Returns:
      the object to configure the combination process
    • streams

      @CheckReturnValue public <T1, T2, T3, T4> MultiItemCombine4<T1,T2,T3,T4> streams(Flow.Publisher<? extends T1> a, Flow.Publisher<? extends T2> b, Flow.Publisher<? extends T3> c, Flow.Publisher<? extends T4> d)
      Combines the items from 4 streams.
      Type Parameters:
      T1 - the type of item from the first stream
      T2 - the type of item from the second stream
      T3 - the type of item from the third stream
      T4 - the type of item from the fourth stream
      Parameters:
      a - the first stream, must not be null
      b - the second stream, must not be null
      c - the third stream, must not be null
      d - the fourth stream, must not be null
      Returns:
      the object to configure the combination process
    • streams

      @CheckReturnValue public <T1, T2, T3, T4, T5> MultiItemCombine5<T1,T2,T3,T4,T5> streams(Flow.Publisher<? extends T1> a, Flow.Publisher<? extends T2> b, Flow.Publisher<? extends T3> c, Flow.Publisher<? extends T4> d, Flow.Publisher<? extends T5> e)
      Combines the items from 5 streams.
      Type Parameters:
      T1 - the type of item from the first stream
      T2 - the type of item from the second stream
      T3 - the type of item from the third stream
      T4 - the type of item from the fourth stream
      T5 - the type of item from the fifth stream
      Parameters:
      a - the first stream, must not be null
      b - the second stream, must not be null
      c - the third stream, must not be null
      d - the fourth stream, must not be null
      e - the fifth stream, must not be null
      Returns:
      the object to configure the combination process
    • streams

      @CheckReturnValue public <T1, T2, T3, T4, T5, T6> MultiItemCombine6<T1,T2,T3,T4,T5,T6> streams(Flow.Publisher<? extends T1> a, Flow.Publisher<? extends T2> b, Flow.Publisher<? extends T3> c, Flow.Publisher<? extends T4> d, Flow.Publisher<? extends T5> e, Flow.Publisher<? extends T6> f)
      Combines the items from 6 streams.
      Type Parameters:
      T1 - the type of item from the first stream
      T2 - the type of item from the second stream
      T3 - the type of item from the third stream
      T4 - the type of item from the fourth stream
      T5 - the type of item from the fifth stream
      T6 - the type of item from the sixth stream
      Parameters:
      a - the first stream, must not be null
      b - the second stream, must not be null
      c - the third stream, must not be null
      d - the fourth stream, must not be null
      e - the fifth stream, must not be null
      f - the sixth stream, must not be null
      Returns:
      the object to configure the combination process
    • streams

      @CheckReturnValue public <T1, T2, T3, T4, T5, T6, T7> MultiItemCombine7<T1,T2,T3,T4,T5,T6,T7> streams(Flow.Publisher<? extends T1> a, Flow.Publisher<? extends T2> b, Flow.Publisher<? extends T3> c, Flow.Publisher<? extends T4> d, Flow.Publisher<? extends T5> e, Flow.Publisher<? extends T6> f, Flow.Publisher<? extends T7> g)
      Combines the items from 7 streams.
      Type Parameters:
      T1 - the type of item from the first stream
      T2 - the type of item from the second stream
      T3 - the type of item from the third stream
      T4 - the type of item from the fourth stream
      T5 - the type of item from the fifth stream
      T6 - the type of item from the sixth stream
      T7 - the type of item from the seventh stream
      Parameters:
      a - the first stream, must not be null
      b - the second stream, must not be null
      c - the third stream, must not be null
      d - the fourth stream, must not be null
      e - the fifth stream, must not be null
      f - the sixth stream, must not be null
      g - the seventh stream, must not be null
      Returns:
      the object to configure the combination process
    • streams

      @CheckReturnValue public <T1, T2, T3, T4, T5, T6, T7, T8> MultiItemCombine8<T1,T2,T3,T4,T5,T6,T7,T8> streams(Flow.Publisher<? extends T1> a, Flow.Publisher<? extends T2> b, Flow.Publisher<? extends T3> c, Flow.Publisher<? extends T4> d, Flow.Publisher<? extends T5> e, Flow.Publisher<? extends T6> f, Flow.Publisher<? extends T7> g, Flow.Publisher<? extends T8> h)
      Combines the items from 8 streams.
      Type Parameters:
      T1 - the type of item from the first stream
      T2 - the type of item from the second stream
      T3 - the type of item from the third stream
      T4 - the type of item from the fourth stream
      T5 - the type of item from the fifth stream
      T6 - the type of item from the sixth stream
      T7 - the type of item from the seventh stream
      T8 - the type of item from the eighth stream
      Parameters:
      a - the first stream, must not be null
      b - the second stream, must not be null
      c - the third stream, must not be null
      d - the fourth stream, must not be null
      e - the fifth stream, must not be null
      f - the sixth stream, must not be null
      g - the seventh stream, must not be null
      h - the eighth stream, must not be null
      Returns:
      the object to configure the combination process
    • streams

      @CheckReturnValue public <T1, T2, T3, T4, T5, T6, T7, T8, T9> MultiItemCombine9<T1,T2,T3,T4,T5,T6,T7,T8,T9> streams(Flow.Publisher<? extends T1> a, Flow.Publisher<? extends T2> b, Flow.Publisher<? extends T3> c, Flow.Publisher<? extends T4> d, Flow.Publisher<? extends T5> e, Flow.Publisher<? extends T6> f, Flow.Publisher<? extends T7> g, Flow.Publisher<? extends T8> h, Flow.Publisher<? extends T9> i)
      Combines the items from 9 streams.
      Type Parameters:
      T1 - the type of item from the first stream
      T2 - the type of item from the second stream
      T3 - the type of item from the third stream
      T4 - the type of item from the fourth stream
      T5 - the type of item from the fifth stream
      T6 - the type of item from the sixth stream
      T7 - the type of item from the seventh stream
      T8 - the type of item from the eighth stream
      T9 - the type of item from the ninth stream
      Parameters:
      a - the first stream, must not be null
      b - the second stream, must not be null
      c - the third stream, must not be null
      d - the fourth stream, must not be null
      e - the fifth stream, must not be null
      f - the sixth stream, must not be null
      g - the seventh stream, must not be null
      h - the eighth stream, must not be null
      i - the ninth stream, must not be null
      Returns:
      the object to configure the combination process
    • streams

      @CheckReturnValue public MultiItemCombineIterable streams(Iterable<? extends Flow.Publisher<?>> iterable)
      Combines the items from multiple streams.

      If you pass no publishers, the resulting Multi emits the completion event immediately after subscription. If you pass a single publisher, it calls the combination logic for every item from this stream (wrapped in a list of a single element). The resulting Multi emits the result from that combination logic. If you pass multiple publishers, it calls the combination logic for every group of items (1 per upstream publisher) wrapped in a list. The resulting Multi emits the result of that combination logic.

      As soon as one of the publisher completes, the combination completes and the completion event is emitted. If any of the publisher emits a failure, the failure is passed downstream and the combination stops.

      Parameters:
      iterable - the iterable containing the streams to combine. Must not be null
      Returns:
      the object to configure the combination process