Class UniAndGroup<T1>
- java.lang.Object
-
- io.smallrye.mutiny.groups.UniAndGroup<T1>
-
public class UniAndGroup<T1> extends java.lang.ObjectCombines severalunisinto a newUnithat will be fulfilled when allunishave emitted anitemevent and then combines the different outcomes into aTuple, or using a combinator function.The produced
Unifires afailureevent if one of theUnisfires a failure. This causes the otherunisto be cancelled, expect ifcollectFailures()is invoked, which delay thefailureevent until allUnis have completed or failed.
-
-
Constructor Summary
Constructors Constructor Description UniAndGroup(Uni<T1> upstream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T2> UniAndGroup2<T1,T2>uni(Uni<? extends T2> other)Combines the currentUniwith the given one.UniAndGroupIterable<T1>unis(Uni<?>... unis)Combines the currentUniwith the given ones.<T2,T3>
UniAndGroup3<T1,T2,T3>unis(Uni<? extends T2> u2, Uni<? extends T3> u3)Combines the currentUniwith the given ones.<T2,T3,T4>
UniAndGroup4<T1,T2,T3,T4>unis(Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4)Combines the currentUniwith the given ones.<T2,T3,T4,T5>
UniAndGroup5<T1,T2,T3,T4,T5>unis(Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5)Combines the currentUniwith the given ones.<T2,T3,T4,T5,T6>
UniAndGroup6<T1,T2,T3,T4,T5,T6>unis(Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5, Uni<? extends T6> u6)Combines the currentUniwith the given ones.<T2,T3,T4,T5,T6,T7>
UniAndGroup7<T1,T2,T3,T4,T5,T6,T7>unis(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 the currentUniwith the given ones.<T2,T3,T4,T5,T6,T7,T8>
UniAndGroup8<T1,T2,T3,T4,T5,T6,T7,T8>unis(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 the currentUniwith the given ones.<T2,T3,T4,T5,T6,T7,T8,T9>
UniAndGroup9<T1,T2,T3,T4,T5,T6,T7,T8,T9>unis(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 the currentUniwith the given ones.UniAndGroupIterable<T1>unis(java.lang.Iterable<? extends Uni<?>> unis)Combines the currentUniwith the given ones.
-
-
-
Method Detail
-
uni
@CheckReturnValue public <T2> UniAndGroup2<T1,T2> uni(Uni<? extends T2> other)
Combines the currentUniwith the given one. Once bothUnihave completed successfully, the item can be retrieved as aTuple2or computed using aBiFunction.The produced
Unifires afailureevent if one of theUnisfires a failure. This will cause the otherUnito be cancelled, expect ifUniAndGroup2.collectFailures()is invoked which delay the failure event until allUnis have fires an item or failure event. If severalunisfire a failure, the propagated failure is aCompositeExceptionwrapping all the collected failures.- Type Parameters:
T2- the type of the item for the second uni- Parameters:
other- the other uni, must not benull- Returns:
- an
UniAndGroup2to configure the combination
-
unis
@CheckReturnValue public <T2,T3> UniAndGroup3<T1,T2,T3> unis(Uni<? extends T2> u2, Uni<? extends T3> u3)
Combines the currentUniwith the given ones. Once allUnihave completed successfully, the item can be retrieved as aTuple3or computed using aFunctions.Function3.The produced
Unifires afailureevent if one of theUnisfires a failure. This will cause the otherUnito be cancelled, expect ifUniAndGroup3.collectFailures()is invoked which delay the failure event until allUnis have fires an item or failure event. If severalunisfire a failure, the propagated failure is aCompositeExceptionwrapping all the collected failures.- Type Parameters:
T2- the type of the item for the second uniT3- the type of the item for the third uni- Parameters:
u2- the second uni to be combined, must not benullu3- the third uni to be combined, must not benull- Returns:
- an
UniAndGroup3to configure the combination
-
unis
@CheckReturnValue public <T2,T3,T4> UniAndGroup4<T1,T2,T3,T4> unis(Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4)
Combines the currentUniwith the given ones. Once allUnihave completed successfully, the item can be retrieved as aTuple4or computed using aFunctions.Function4.The produced
Unifires afailureevent if one of theUnisfires a failure. This will cause the otherUnito be cancelled, expect ifUniAndGroup4.collectFailures()is invoked which delay the failure event until allUnis have fires an item or failure event. If severalunisfire a failure, the propagated failure is aCompositeExceptionwrapping all the collected failures.- Type Parameters:
T2- 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:
u2- the second uni to be combined, must not benullu3- the third uni to be combined, must not benullu4- the fourth uni to be combined, must not benull- Returns:
- an
UniAndGroup4to configure the combination
-
unis
@CheckReturnValue public <T2,T3,T4,T5> UniAndGroup5<T1,T2,T3,T4,T5> unis(Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5)
Combines the currentUniwith the given ones. Once allUnihave completed successfully, the item can be retrieved as aTuple5or computed using aFunctions.Function5.The produced
Unifires afailureevent if one of theUnisfires a failure. This will cause the otherUnito be cancelled, expect ifUniAndGroup5.collectFailures()is invoked which delay the failure event until allUnis have fires an item or failure event. If severalunisfire a failure, the propagated failure is aCompositeExceptionwrapping all the collected failures.- Type Parameters:
T2- 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:
u2- the second uni to be combined, must not benullu3- the third uni to be combined, must not benullu4- the fourth uni to be combined, must not benullu5- the fifth uni to be combined, must not benull- Returns:
- an
UniAndGroup5to configure the combination
-
unis
@CheckReturnValue public <T2,T3,T4,T5,T6> UniAndGroup6<T1,T2,T3,T4,T5,T6> unis(Uni<? extends T2> u2, Uni<? extends T3> u3, Uni<? extends T4> u4, Uni<? extends T5> u5, Uni<? extends T6> u6)
Combines the currentUniwith the given ones. Once allUnihave completed successfully, the item can be retrieved as aTuple6or computed using aFunctions.Function5.The produced
Unifires afailureevent if one of theUnisfires a failure. This will cause the otherUnito be cancelled, expect ifUniAndGroup6.collectFailures()is invoked which delay the failure event until allUnis have fires an item or failure event. If severalunisfire a failure, the propagated failure is aCompositeExceptionwrapping all the collected failures.- Type Parameters:
T2- 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:
u2- the second uni to be combined, must not benullu3- the third uni to be combined, must not benullu4- the fourth uni to be combined, must not benullu5- the fifth uni to be combined, must not benullu6- the sixth uni to be combined, must not benull- Returns:
- an
UniAndGroup6to configure the combination
-
unis
@CheckReturnValue public <T2,T3,T4,T5,T6,T7> UniAndGroup7<T1,T2,T3,T4,T5,T6,T7> unis(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 the currentUniwith the given ones. Once allUnihave completed successfully, the item can be retrieved as aTuple7or computed using aFunctions.Function7.The produced
Unifires afailureevent if one of theUnisfires a failure. This will cause the otherUnito be cancelled, expect ifUniAndGroup7.collectFailures()is invoked which delay the failure event until allUnis have fires an item or failure event. If severalunisfire a failure, the propagated failure is aCompositeExceptionwrapping all the collected failures.- Type Parameters:
T2- 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:
u2- the second uni to be combined, must not benullu3- the third uni to be combined, must not benullu4- the fourth uni to be combined, must not benullu5- the fifth uni to be combined, must not benullu6- the sixth uni to be combined, must not benullu7- the seventh uni to be combined, must not benull- Returns:
- an
UniAndGroup7to configure the combination
-
unis
@CheckReturnValue public <T2,T3,T4,T5,T6,T7,T8> UniAndGroup8<T1,T2,T3,T4,T5,T6,T7,T8> unis(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 the currentUniwith the given ones. Once allUnihave completed successfully, the item can be retrieved as aTuple8or computed using aFunctions.Function8.The produced
Unifires afailureevent if one of theUnisfires a failure. This will cause the otherUnito be cancelled, expect ifUniAndGroup8.collectFailures()is invoked which delay the failure event until allUnis have fires an item or failure event. If severalunisfire a failure, the propagated failure is aCompositeExceptionwrapping all the collected failures.- Type Parameters:
T2- 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:
u2- the second uni to be combined, must not benullu3- the third uni to be combined, must not benullu4- the fourth uni to be combined, must not benullu5- the fifth uni to be combined, must not benullu6- the sixth uni to be combined, must not benullu7- the seventh uni to be combined, must not benullu8- the eighth uni to be combined, must not benull- Returns:
- an
UniAndGroup8to configure the combination
-
unis
@CheckReturnValue public <T2,T3,T4,T5,T6,T7,T8,T9> UniAndGroup9<T1,T2,T3,T4,T5,T6,T7,T8,T9> unis(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 the currentUniwith the given ones. Once allUnihave completed successfully, the item can be retrieved as aTuple9or computed using aFunctions.Function9.The produced
Unifires afailureevent if one of theUnisfires a failure. This will cause the otherUnito be cancelled, expect ifUniAndGroup9.collectFailures()is invoked which delay the failure event until allUnis have fires an item or failure event. If severalunisfire a failure, the propagated failure is aCompositeExceptionwrapping all the collected failures.- Type Parameters:
T2- 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:
u2- the second uni to be combined, must not benullu3- the third uni to be combined, must not benullu4- the fourth uni to be combined, must not benullu5- the fifth uni to be combined, must not benullu6- the sixth uni to be combined, must not benullu7- the seventh uni to be combined, must not benullu8- the eighth uni to be combined, must not benullu9- the ninth uni to be combined, must not benull- Returns:
- an
UniAndGroup9to configure the combination
-
unis
@CheckReturnValue public UniAndGroupIterable<T1> unis(Uni<?>... unis)
Combines the currentUniwith the given ones. Once allUnihave completed successfully, the item is computed using acombinatorfunctionThe produced
Unifires afailureevent if one of theUnisfires a failure. This will cause the otherUnito be cancelled, expect ifUniAndGroupIterable.collectFailures()is invoked which delay the failure event until allUnis have fires an item or failure event. If severalunisfire a failure, the propagated failure is aCompositeExceptionwrapping all the collected failures.- Parameters:
unis- the list of unis, must not benull, must not containnull, must not be empty- Returns:
- an
UniAndGroupIterableto configure the combination
-
unis
@CheckReturnValue public UniAndGroupIterable<T1> unis(java.lang.Iterable<? extends Uni<?>> unis)
Combines the currentUniwith the given ones. Once allUnihave completed successfully, the item is computed using acombinatorfunctionThe produced
Unifires afailureevent if one of theUnisfires a failure. This will cause the otherUnito be cancelled, expect ifUniAndGroupIterable.collectFailures()is invoked which delay the failure event until allUnis have fires an item or failure event. If severalunisfire a failure, the propagated failure is aCompositeExceptionwrapping all the collected failures.- Parameters:
unis- the list of unis, must not benull, must not containnull, must not be empty- Returns:
- an
UniAndGroupIterableto configure the combination
-
-