- java.lang.Object
-
- io.smallrye.mutiny.groups.MultiRepetition
-
public class MultiRepetition extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MultiRepetition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> UniRepeat<T>completionStage(java.util.function.Supplier<? extends java.util.concurrent.CompletionStage<? extends T>> supplier)Creates aMultiby repeating the items fired by the producedCompletionStage.<S,T>
UniRepeat<T>completionStage(java.util.function.Supplier<S> stateSupplier, java.util.function.Function<S,? extends java.util.concurrent.CompletionStage<? extends T>> producer)Creates aMultiby repeating the items fired by the producedCompletionStage.<T> UniRepeat<T>supplier(java.util.function.Supplier<? extends T> supplier)Creates aMultiby repeating the items fired by the producedFunctionproducing the items.<S,T>
UniRepeat<T>supplier(java.util.function.Supplier<S> stateSupplier, java.util.function.Function<S,? extends T> producer)Creates aMultiby repeating the items fired by the producedFunctionproducing the items.<T> UniRepeat<T>uni(java.util.function.Consumer<UniEmitter<? super T>> consumer)Creates aMultiby repeating the items fired by the producedConsumerreceiving anUniEmitterto fire the item or failure.<T> UniRepeat<T>uni(java.util.function.Supplier<Uni<? extends T>> uniSupplier)<S,T>
UniRepeat<T>uni(java.util.function.Supplier<S> stateSupplier, java.util.function.BiConsumer<S,UniEmitter<? super T>> consumer)Creates aMultiby repeating the items fired by the producedBiConsumer.<S,T>
UniRepeat<T>uni(java.util.function.Supplier<S> stateSupplier, java.util.function.Function<S,Uni<? extends T>> producer)
-
-
-
Method Detail
-
uni
@CheckReturnValue public <S,T> UniRepeat<T> uni(java.util.function.Supplier<S> stateSupplier, java.util.function.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
@CheckReturnValue public <T> UniRepeat<T> uni(java.util.function.Supplier<Uni<? extends T>> uniSupplier)
- 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(java.util.function.Supplier<S> stateSupplier, java.util.function.Function<S,? extends java.util.concurrent.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(java.util.function.Supplier<? extends java.util.concurrent.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(java.util.function.Supplier<S> stateSupplier, java.util.function.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
@CheckReturnValue public <T> UniRepeat<T> uni(java.util.function.Consumer<UniEmitter<? super T>> consumer)
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
@CheckReturnValue public <T> UniRepeat<T> supplier(java.util.function.Supplier<? extends T> supplier)
Creates aMultiby repeating the items fired by the producedFunctionproducing 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(java.util.function.Supplier<S> stateSupplier, java.util.function.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
-
-