Package io.smallrye.mutiny.groups
Class MultiRepetition
- 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 aMulti
by 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 aMulti
by repeating the items fired by the producedCompletionStage
.<T> UniRepeat<T>
supplier(java.util.function.Supplier<? extends T> supplier)
Creates aMulti
by repeating the items fired by the producedFunction
producing the items.<S,T>
UniRepeat<T>supplier(java.util.function.Supplier<S> stateSupplier, java.util.function.Function<S,? extends T> producer)
Creates aMulti
by repeating the items fired by the producedFunction
producing the items.<T> UniRepeat<T>
uni(java.util.function.Consumer<UniEmitter<? super T>> consumer)
Creates aMulti
by repeating the items fired by the producedConsumer
receiving anUniEmitter
to 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 aMulti
by 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 aMulti
by repeating the items fired by the producedUni
. The producer ofUni
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 ofUni
called 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 ofUni
called 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 aMulti
by repeating the items fired by the producedCompletionStage
. The producer ofCompletionStage
receives 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 ofCompletionStage
called 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 aMulti
by repeating the items fired by the producedCompletionStage
.- Type Parameters:
T
- the type of emitted item- Parameters:
supplier
- the producer ofCompletionStage
called 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 aMulti
by repeating the items fired by the producedBiConsumer
. The bi-consumer receives the shared state and anUniEmitter
that 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 aMulti
by repeating the items fired by the producedConsumer
receiving anUniEmitter
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(java.util.function.Supplier<? extends T> supplier)
Creates aMulti
by repeating the items fired by the producedFunction
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(java.util.function.Supplier<S> stateSupplier, java.util.function.Function<S,? extends T> producer)
Creates aMulti
by repeating the items fired by the producedFunction
producing 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
-
-