Class UniZip
- java.lang.Object
-
- io.smallrye.mutiny.groups.UniZip
-
public class UniZip extends java.lang.Object
Combines severalUni
into a newUni
that will fire an item event when allUni
are resolved successfully aggregating their results (emitted item) into aTuple
, or using a combinator function.The produced
Uni
fire a failure if one ofUnis
produces a failure. This will cause the otherUni
to be cancelled, expect ifcollectFailures()
is invoked, which delay firing the failure until allUni
s have completed or failed.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <O> UniAndGroupIterable<O>
unis(Uni<?>... unis)
Combines severalunis
together.<T1,T2>
UniAndGroup2<T1,T2>unis(Uni<? extends T1> u1, Uni<? extends T2> u2)
Combines twounis
together.<T1,T2,T3>
UniAndGroup3<T1,T2,T3>unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3)
Combines the threeunis
together.<T1,T2,T3,T4>
UniAndGroup4<T1,T2,T3,T4>unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4)
Combines fourunis
together.<T1,T2,T3,T4,T5>
UniAndGroup5<T1,T2,T3,T4,T5>unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5)
Combines fiveunis
together.<T1,T2,T3,T4,T5,T6>
UniAndGroup6<T1,T2,T3,T4,T5,T6>unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5, Uni<? extends T6> u6)
Combines sixunis
together.<T1,T2,T3,T4,T5,T6,T7>
UniAndGroup7<T1,T2,T3,T4,T5,T6,T7>unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5, Uni<? extends T6> u6, Uni<? extends T7> u7)
Combines 7unis
together.<T1,T2,T3,T4,T5,T6,T7,T8>
UniAndGroup8<T1,T2,T3,T4,T5,T6,T7,T8>unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5, Uni<? extends T6> u6, Uni<? extends T7> u7, Uni<? extends T8> u8)
Combines 8unis
together.<T1,T2,T3,T4,T5,T6,T7,T8,T9>
UniAndGroup9<T1,T2,T3,T4,T5,T6,T7,T8,T9>unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5, Uni<? extends T6> u6, Uni<? extends T7> u7, Uni<? extends T8> u8, Uni<? extends T9> u9)
Combines 9unis
together.<O> UniAndGroupIterable<O>
unis(java.lang.Iterable<? extends Uni<?>> unis)
Combines severalunis
together.
-
-
-
Method Detail
-
unis
@CheckReturnValue public <T1,T2> UniAndGroup2<T1,T2> unis(Uni<? extends T1> u1, Uni<? extends T2> u2)
Combines twounis
together. Once bothUni
have completed successfully, the item can be retrieved as aTuple2
or computed using aBiFunction
.The produced
Uni
fires afailure
event if one of theUnis
fires a failure. This will cause the otherUni
to be cancelled, expect ifUniAndGroup2.collectFailures()
is invoked which delay the failure event until allUni
s have fires an item or failure event. If severalunis
fire a failure, the propagated failure is aCompositeException
wrapping all the collected failures.- Type Parameters:
T1
- the type of the item for the first uniT2
- the type of the item for the second uni- Parameters:
u1
- the first uni, must not benull
u2
- the second uni, must not benull
- Returns:
- an
UniAndGroup2
to configure the combination
-
unis
@CheckReturnValue public <T1,T2,T3> UniAndGroup3<T1,T2,T3> unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3)
Combines the threeunis
together. Once allUni
have completed successfully, the item can be retrieved as aTuple3
or computed using aFunctions.Function3
.The produced
Uni
fires afailure
event if one of theUnis
fires a failure. This will cause the otherUni
to be cancelled, expect ifUniAndGroup3.collectFailures()
is invoked which delay the failure event until allUni
s have fires an item or failure event. If severalunis
fire a failure, the propagated failure is aCompositeException
wrapping all the collected failures.- Type Parameters:
T1
- the type of the item for the first uniT2
- the type of the item for the second uniT3
- the type of the item for the third uni- Parameters:
u1
- the first uni to be combined, must not benull
u2
- the second uni to be combined, must not benull
u3
- the third uni to be combined, must not benull
- Returns:
- an
UniAndGroup3
to configure the combination
-
unis
@CheckReturnValue public <T1,T2,T3,T4> UniAndGroup4<T1,T2,T3,T4> unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4)
Combines fourunis
together. Once allUni
have completed successfully, the item can be retrieved as aTuple4
or computed using aFunctions.Function4
.The produced
Uni
fires afailure
event if one of theUnis
fires a failure. This will cause the otherUni
to be cancelled, expect ifUniAndGroup4.collectFailures()
is invoked which delay the failure event until allUni
s have fires an item or failure event. If severalunis
fire a failure, the propagated failure is aCompositeException
wrapping all the collected failures.- Type Parameters:
T1
- the type of the item for the first uniT2
- the type of the item for the second uniT3
- the type of the item for the third uniT4
- the type of the item for the fourth uni- Parameters:
u1
- the first uni to be combined, must not benull
u2
- the second uni to be combined, must not benull
u3
- the third uni to be combined, must not benull
u4
- the fourth uni to be combined, must not benull
- Returns:
- an
UniAndGroup4
to configure the combination
-
unis
@CheckReturnValue public <T1,T2,T3,T4,T5> UniAndGroup5<T1,T2,T3,T4,T5> unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5)
Combines fiveunis
together. Once allUni
have completed successfully, the item can be retrieved as aTuple5
or computed using aFunctions.Function5
.The produced
Uni
fires afailure
event if one of theUnis
fires a failure. This will cause the otherUni
to be cancelled, expect ifUniAndGroup5.collectFailures()
is invoked which delay the failure event until allUni
s have fires an item or failure event. If severalunis
fire a failure, the propagated failure is aCompositeException
wrapping all the collected failures.- Type Parameters:
T1
- the type of the item for the first uniT2
- the type of the item for the second uniT3
- the type of the item for the third uniT4
- the type of the item for the fourth uniT5
- the type of the item for the fifth uni- Parameters:
u1
- the first uni to be combined, must not benull
u2
- the second uni to be combined, must not benull
u3
- the third uni to be combined, must not benull
u4
- the fourth uni to be combined, must not benull
u5
- the fifth uni to be combined, must not benull
- Returns:
- an
UniAndGroup5
to configure the combination
-
unis
@CheckReturnValue public <T1,T2,T3,T4,T5,T6> UniAndGroup6<T1,T2,T3,T4,T5,T6> unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5, Uni<? extends T6> u6)
Combines sixunis
together. Once allUni
have completed successfully, the item can be retrieved as aTuple6
or computed using aFunctions.Function6
.The produced
Uni
fires afailure
event if one of theUnis
fires a failure. This will cause the otherUni
to be cancelled, expect ifUniAndGroup6.collectFailures()
is invoked which delay the failure event until allUni
s have fires an item or failure event. If severalunis
fire a failure, the propagated failure is aCompositeException
wrapping all the collected failures.- Type Parameters:
T1
- the type of the item for the first uniT2
- the type of the item for the second uniT3
- the type of the item for the third uniT4
- the type of the item for the fourth uniT5
- the type of the item for the fifth uniT6
- the type of the item for the sixth uni- Parameters:
u1
- the first uni to be combined, must not benull
u2
- the second uni to be combined, must not benull
u3
- the third uni to be combined, must not benull
u4
- the fourth uni to be combined, must not benull
u5
- the fifth uni to be combined, must not benull
u6
- the sixth uni to be combined, must not benull
- Returns:
- an
UniAndGroup6
to configure the combination
-
unis
@CheckReturnValue public <T1,T2,T3,T4,T5,T6,T7> UniAndGroup7<T1,T2,T3,T4,T5,T6,T7> unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5, Uni<? extends T6> u6, Uni<? extends T7> u7)
Combines 7unis
together. Once allUni
have completed successfully, the item can be retrieved as aTuple7
or computed using aFunctions.Function8
.The produced
Uni
fires afailure
event if one of theUnis
fires a failure. This will cause the otherUni
to be cancelled, expect ifUniAndGroup7.collectFailures()
is invoked which delay the failure event until allUni
s have fires an item or failure event. If severalunis
fire a failure, the propagated failure is aCompositeException
wrapping all the collected failures.- Type Parameters:
T1
- the type of the item for the first uniT2
- the type of the item for the second uniT3
- the type of the item for the third uniT4
- the type of the item for the fourth uniT5
- the type of the item for the fifth uniT6
- the type of the item for the sixth uniT7
- the type of the item for the seventh uni- Parameters:
u1
- the first uni to be combined, must not benull
u2
- the second uni to be combined, must not benull
u3
- the third uni to be combined, must not benull
u4
- the fourth uni to be combined, must not benull
u5
- the fifth uni to be combined, must not benull
u6
- the sixth uni to be combined, must not benull
u7
- the seventh uni to be combined, must not benull
- Returns:
- an
UniAndGroup7
to configure the combination
-
unis
@CheckReturnValue public <T1,T2,T3,T4,T5,T6,T7,T8> UniAndGroup8<T1,T2,T3,T4,T5,T6,T7,T8> unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5, Uni<? extends T6> u6, Uni<? extends T7> u7, Uni<? extends T8> u8)
Combines 8unis
together. Once allUni
have completed successfully, the item can be retrieved as aTuple8
or computed using aFunctions.Function8
.The produced
Uni
fires afailure
event if one of theUnis
fires a failure. This will cause the otherUni
to be cancelled, expect ifUniAndGroup8.collectFailures()
is invoked which delay the failure event until allUni
s have fires an item or failure event. If severalunis
fire a failure, the propagated failure is aCompositeException
wrapping all the collected failures.- Type Parameters:
T1
- the type of the item for the first uniT2
- the type of the item for the second uniT3
- the type of the item for the third uniT4
- the type of the item for the fourth uniT5
- the type of the item for the fifth uniT6
- the type of the item for the sixth uniT7
- the type of the item for the seventh uniT8
- the type of the item for the eighth uni- Parameters:
u1
- the first uni to be combined, must not benull
u2
- the second uni to be combined, must not benull
u3
- the third uni to be combined, must not benull
u4
- the fourth uni to be combined, must not benull
u5
- the fifth uni to be combined, must not benull
u6
- the sixth uni to be combined, must not benull
u7
- the seventh uni to be combined, must not benull
u8
- the eighth uni to be combined, must not benull
- Returns:
- an
UniAndGroup8
to configure the combination
-
unis
@CheckReturnValue public <T1,T2,T3,T4,T5,T6,T7,T8,T9> UniAndGroup9<T1,T2,T3,T4,T5,T6,T7,T8,T9> unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5, Uni<? extends T6> u6, Uni<? extends T7> u7, Uni<? extends T8> u8, Uni<? extends T9> u9)
Combines 9unis
together. Once allUni
have completed successfully, the item can be retrieved as aTuple9
or computed using aFunctions.Function9
.The produced
Uni
fires afailure
event if one of theUnis
fires a failure. This will cause the otherUni
to be cancelled, expect ifUniAndGroup9.collectFailures()
is invoked which delay the failure event until allUni
s have fires an item or failure event. If severalunis
fire a failure, the propagated failure is aCompositeException
wrapping all the collected failures.- Type Parameters:
T1
- the type of the item for the first uniT2
- the type of the item for the second uniT3
- the type of the item for the third uniT4
- the type of the item for the fourth uniT5
- the type of the item for the fifth uniT6
- the type of the item for the sixth uniT7
- the type of the item for the seventh uniT8
- the type of the item for the eighth uniT9
- the type of the item for the ninth uni- Parameters:
u1
- the first uni to be combined, must not benull
u2
- the second uni to be combined, must not benull
u3
- the third uni to be combined, must not benull
u4
- the fourth uni to be combined, must not benull
u5
- the fifth uni to be combined, must not benull
u6
- the sixth uni to be combined, must not benull
u7
- the seventh uni to be combined, must not benull
u8
- the eighth uni to be combined, must not benull
u9
- the ninth uni to be combined, must not benull
- Returns:
- an
UniAndGroup9
to configure the combination
-
unis
@CheckReturnValue public <O> UniAndGroupIterable<O> unis(Uni<?>... unis)
Combines severalunis
together. Once allUni
have completed successfully, the item is computed using acombinator
function.The produced
Uni
fires afailure
event if one of theUnis
fires a failure. This will cause the otherUni
to be cancelled, expect ifUniAndGroupIterable.collectFailures()
is invoked which delay the failure event until allUni
s have fires an item or failure event. If severalunis
fire a failure, the propagated failure is aCompositeException
wrapping all the collected failures.- Type Parameters:
O
- the expected type of item produced by the combinator- Parameters:
unis
- the list of unis, must not benull
, must not containnull
, must not be empty- Returns:
- an
UniAndGroupIterable
to configure the combination
-
unis
@CheckReturnValue public <O> UniAndGroupIterable<O> unis(java.lang.Iterable<? extends Uni<?>> unis)
Combines severalunis
together. Once allUni
have completed successfully, the item is computed using acombinator
function.The produced
Uni
fires afailure
event if one of theUnis
fires a failure. This will cause the otherUni
to be cancelled, expect ifUniAndGroupIterable.collectFailures()
is invoked which delay the failure event until allUni
s have fires an item or failure event. If severalunis
fire a failure, the propagated failure is aCompositeException
wrapping all the collected failures.- Type Parameters:
O
- the expected type of item produced by the combinator- Parameters:
unis
- the list of unis, must not benull
, must not containnull
, must not be empty- Returns:
- an
UniAndGroupIterable
to configure the combination
-
-