Class MultiOnItemGather<I>

java.lang.Object
io.smallrye.mutiny.groups.MultiOnItemGather<I>
Type Parameters:
I - the type of the items emitted by the upstream Multi

@Experimental("This API is still being designed and may change in the future") public class MultiOnItemGather<I> extends Object
A builder to gather items emitted by a Multi into an accumulator.
  • Constructor Details

    • MultiOnItemGather

      public MultiOnItemGather(Multi<I> upstream)
  • Method Details

    • into

      @CheckReturnValue public <ACC> MultiOnItemGather.InitialAccumulatorStep<I,ACC> into(Supplier<ACC> initialAccumulatorSupplier)
      Specifies the initial accumulator supplier.

      The accumulator is used to accumulate the items emitted by the upstream.

      Type Parameters:
      ACC - the type of the accumulator
      Parameters:
      initialAccumulatorSupplier - the initial accumulator supplier, the returned value cannot be null
      Returns:
      the next step in the builder