Package io.smallrye.mutiny.groups
Class UniAndGroup2<T1,T2>
- 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 Modifier and Type Method Description Uni<Tuple2<T1,T2>>
asTuple()
UniAndGroup2<T1,T2>
collectFailures()
Configure the processing to wait until all theunis
to fire an event (item or failure) before firing the failure.<O> Uni<O>
combinedWith(java.util.function.BiFunction<T1,T2,O> combinator)
Creates the resultingUni
.-
Methods inherited from class io.smallrye.mutiny.groups.UniAndGroupIterable
combinedWith, combinedWith, discardItems
-
-
-
-
Method Detail
-
collectFailures
@CheckReturnValue public UniAndGroup2<T1,T2> collectFailures()
Configure the processing to wait until all theunis
to fire an event (item or failure) before firing the failure. If several failures have been collected, aCompositeException
is fired wrapping the different failures.- Overrides:
collectFailures
in 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
@CheckReturnValue public <O> Uni<O> combinedWith(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
. The items are combined into aTuple2<T1, T2>
.
-
-