- java.lang.Object
-
- io.smallrye.mutiny.groups.UniAndGroupIterable<T1>
-
- io.smallrye.mutiny.groups.UniAndGroup2<T1,T2>
-
public class UniAndGroup2<T1,T2> extends UniAndGroupIterable<T1>
Configures the combination of 2unis.
-
-
Constructor Summary
Constructors Constructor Description UniAndGroup2(Uni<? extends T1> source, Uni<? extends T2> other)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Uni<Tuple2<T1,T2>>asTuple()UniAndGroup2<T1,T2>collectFailures()Configure the processing to wait until all theunisto fire an event (item or failure) before firing the failure.<O> Uni<O>combinedWith(java.util.function.BiFunction<T1,T2,O> combinator)Deprecated.usewith(BiFunction)instead<O> Uni<O>with(java.util.function.BiFunction<T1,T2,O> combinator)Creates the resultingUni.<O> Uni<O>withUni(java.util.function.BiFunction<T1,T2,Uni<O>> combinator)Creates the resultingUni.-
Methods inherited from class io.smallrye.mutiny.groups.UniAndGroupIterable
combinedWith, combinedWith, discardItems, usingConcurrencyOf, with, with, withUni, withUni
-
-
-
-
Method Detail
-
collectFailures
@CheckReturnValue public UniAndGroup2<T1,T2> 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
@CheckReturnValue public Uni<Tuple2<T1,T2>> asTuple()
- Returns:
- the resulting
Uni. The items are combined into aTuple2<T1, T2>.
-
combinedWith
@Deprecated @CheckReturnValue public <O> Uni<O> combinedWith(java.util.function.BiFunction<T1,T2,O> combinator)
Deprecated.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
@CheckReturnValue public <O> Uni<O> with(java.util.function.BiFunction<T1,T2,O> combinator)
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
@CheckReturnValue public <O> Uni<O> withUni(java.util.function.BiFunction<T1,T2,Uni<O>> combinator)
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>.
-
-