java.lang.Object
io.smallrye.mutiny.groups.UniAndGroupIterable<T1>
io.smallrye.mutiny.groups.UniAndGroup2<T1,T2>
Configures the combination of 2
unis.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasTuple()Configure the processing to wait until all theunisto fire an event (item or failure) before firing the failure.<O> Uni<O> combinedWith(BiFunction<T1, T2, O> combinator) Deprecated, for removal: This API element is subject to removal in a future version.usingConcurrencyOf(int level) Limit the number of concurrent upstream subscriptions.<O> Uni<O> with(BiFunction<T1, T2, O> combinator) Creates the resultingUni.<O> Uni<O> withUni(BiFunction<T1, T2, Uni<O>> combinator) Creates the resultingUni.Methods inherited from class io.smallrye.mutiny.groups.UniAndGroupIterable
combinedWith, combinedWith, discardItems, with, with, withUni, withUni
-
Constructor Details
-
UniAndGroup2
-
-
Method Details
-
collectFailures
Configure the processing to wait until all theunisto fire an event (item or failure) before firing the failure. If several failures have been collected, aCompositeExceptionis fired wrapping the different failures.- Overrides:
collectFailuresin classUniAndGroupIterable<T1>- Returns:
- the current
UniAndGroup2
-
asTuple
- Returns:
- the resulting
Uni. The items are combined into aTuple2<T1, T2>.
-
usingConcurrencyOf
Limit the number of concurrent upstream subscriptions.When not specified all upstream
Uniare being subscribed when the combiningUniis subscribed.Setting a limit is useful when you have a large number of
Unito combine and their simultaneous subscriptions might overwhelm resources (e.g., database connections, etc).- Overrides:
usingConcurrencyOfin classUniAndGroupIterable<T1>- Parameters:
level- the concurrency level, must be strictly positive- Returns:
- an object to configure the combination logic
-
combinedWith
@Deprecated(forRemoval=true) @CheckReturnValue public <O> Uni<O> combinedWith(BiFunction<T1, T2, O> combinator) Deprecated, for removal: This API element is subject to removal in a future version.usewith(BiFunction)insteadCreates the resultingUni. The items are combined using the given combinator function.- Type Parameters:
O- the type of item- Parameters:
combinator- the combinator function, must not benull- Returns:
- the resulting
Uni<O>. The items are combined intoUniAndGroup2
-
with
Creates the resultingUni. The items are combined using the given combinator function.- Type Parameters:
O- the type of item- Parameters:
combinator- the combinator function, must not benull- Returns:
- the resulting
Uni<O>. The items are combined intoUniAndGroup2
-
withUni
Creates the resultingUni. The items are combined using the given combinator function, and the resultingUni<Uni<O>>is flattened.- Type Parameters:
O- the type of item- Parameters:
combinator- the combinator function, must not benull- Returns:
- the resulting
Uni. The items are combined into aTuple2<T1, T2>.
-
with(BiFunction)instead