java.lang.Object
io.smallrye.mutiny.groups.MultiRepetition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> UniRepeat<T> completionStage(Supplier<? extends CompletionStage<? extends T>> supplier) Creates aMultiby repeating the items fired by the producedCompletionStage.<S,T> UniRepeat <T> completionStage(Supplier<S> stateSupplier, Function<S, ? extends CompletionStage<? extends T>> producer) Creates aMultiby repeating the items fired by the producedCompletionStage.<T> UniRepeat<T> <S,T> UniRepeat <T> <T> UniRepeat<T> uni(Consumer<UniEmitter<? super T>> consumer) Creates aMultiby repeating the items fired by the producedConsumerreceiving anUniEmitterto fire the item or failure.<T> UniRepeat<T> <S,T> UniRepeat <T> uni(Supplier<S> stateSupplier, BiConsumer<S, UniEmitter<? super T>> consumer) Creates aMultiby repeating the items fired by the producedBiConsumer.<S,T> UniRepeat <T>
-
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 aMultiby repeating the items fired by the producedUni. The producer ofUnireceives a shared state.- Type Parameters:
S- the type of the shared stateT- the type of emitted item- Parameters:
stateSupplier- the state supplier, must not benull, must not returnnull.producer- the producer ofUnicalled for every requested repetition- Returns:
- the object to configure the repetition
-
uni
- Type Parameters:
T- the type of emitted item- Parameters:
uniSupplier- the producer ofUnicalled 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 aMultiby repeating the items fired by the producedCompletionStage. The producer ofCompletionStagereceives a shared state.- Type Parameters:
S- the type of the shared stateT- the type of emitted item- Parameters:
stateSupplier- the state producer, must not benull, must not returnnull.producer- the producer ofCompletionStagecalled 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 aMultiby repeating the items fired by the producedCompletionStage.- Type Parameters:
T- the type of emitted item- Parameters:
supplier- the producer ofCompletionStagecalled 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 aMultiby repeating the items fired by the producedBiConsumer. The bi-consumer receives the shared state and anUniEmitterthat allow firing the item (or failure).- Type Parameters:
S- the type of the shared stateT- the type of emitted item- Parameters:
stateSupplier- the state supplier, must not benull, must not returnnull.consumer- the consumer called for every requested repetition- Returns:
- the object to configure the repetition
-
uni
Creates aMultiby repeating the items fired by the producedConsumerreceiving anUniEmitterto 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
- 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 aMultiby repeating the items fired by the producedFunctionproducing the items. The function receives a shared state.- Type Parameters:
S- the type of the shared stateT- the type of emitted item- Parameters:
stateSupplier- the state supplier, must not benull, must not returnnull.producer- the producer called for every requested repetition- Returns:
- the object to configure the repetition
-