Class MultiRepetition

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

public class MultiRepetition extends Object
  • Constructor Details

    • MultiRepetition

      public MultiRepetition()
  • Method Details

    • uni

      @CheckReturnValue public <S, T> UniRepeat<T> uni(Supplier<S> stateSupplier, Function<S,Uni<? extends T>> producer)
      Creates a Multi by repeating the items fired by the produced Uni. The producer of Uni receives a shared state.
      Type Parameters:
      S - the type of the shared state
      T - the type of emitted item
      Parameters:
      stateSupplier - the state supplier, must not be null, must not return null.
      producer - the producer of Uni called for every requested repetition
      Returns:
      the object to configure the repetition
    • uni

      @CheckReturnValue public <T> UniRepeat<T> uni(Supplier<Uni<? extends T>> uniSupplier)
      Creates a Multi by repeating the items fired by the produced Uni.
      Type Parameters:
      T - the type of emitted item
      Parameters:
      uniSupplier - the producer of Uni called for every requested repetition
      Returns:
      the object to configure the repetition
    • completionStage

      @CheckReturnValue public <S, T> UniRepeat<T> completionStage(Supplier<S> stateSupplier, Function<S,? extends CompletionStage<? extends T>> producer)
      Creates a Multi by repeating the items fired by the produced CompletionStage. The producer of CompletionStage receives a shared state.
      Type Parameters:
      S - the type of the shared state
      T - the type of emitted item
      Parameters:
      stateSupplier - the state producer, must not be null, must not return null.
      producer - the producer of CompletionStage called for every requested repetition
      Returns:
      the object to configure the repetition
    • completionStage

      @CheckReturnValue public <T> UniRepeat<T> completionStage(Supplier<? extends CompletionStage<? extends T>> supplier)
      Creates a Multi by repeating the items fired by the produced CompletionStage.
      Type Parameters:
      T - the type of emitted item
      Parameters:
      supplier - the producer of CompletionStage called for every requested repetition
      Returns:
      the object to configure the repetition
    • uni

      @CheckReturnValue public <S, T> UniRepeat<T> uni(Supplier<S> stateSupplier, BiConsumer<S,UniEmitter<? super T>> consumer)
      Creates a Multi by repeating the items fired by the produced BiConsumer. The bi-consumer receives the shared state and an UniEmitter that allow firing the item (or failure).
      Type Parameters:
      S - the type of the shared state
      T - the type of emitted item
      Parameters:
      stateSupplier - the state supplier, must not be null, must not return null.
      consumer - the consumer called for every requested repetition
      Returns:
      the object to configure the repetition
    • uni

      @CheckReturnValue public <T> UniRepeat<T> uni(Consumer<UniEmitter<? super T>> consumer)
      Creates a Multi by repeating the items fired by the produced Consumer receiving an UniEmitter to fire the item or failure.
      Type Parameters:
      T - the type of emitted item
      Parameters:
      consumer - the consumer called for every requested repetition
      Returns:
      the object to configure the repetition
    • supplier

      @CheckReturnValue public <T> UniRepeat<T> supplier(Supplier<? extends T> supplier)
      Creates a Multi by repeating the items fired by the produced Function producing the items.
      Type Parameters:
      T - the type of emitted item
      Parameters:
      supplier - the producer called for every requested repetition
      Returns:
      the object to configure the repetition
    • supplier

      @CheckReturnValue public <S, T> UniRepeat<T> supplier(Supplier<S> stateSupplier, Function<S,? extends T> producer)
      Creates a Multi by repeating the items fired by the produced Function producing the items. The function receives a shared state.
      Type Parameters:
      S - the type of the shared state
      T - the type of emitted item
      Parameters:
      stateSupplier - the state supplier, must not be null, must not return null.
      producer - the producer called for every requested repetition
      Returns:
      the object to configure the repetition