public class UniZip extends Object
Uni into a new Uni that will fire an item event when all Uni are
resolved successfully aggregating their results (emitted item) into a Tuple, or using a combinator function.
The produced Uni fire a failure if one of Unis produces a failure. This will
cause the other Uni to be cancelled, expect if collectFailures() is invoked, which delay firing
the failure until all Unis have completed or failed.
| Modifier and Type | Method and Description |
|---|---|
<O> UniAndGroupIterable<O> |
unis(Iterable<? extends Uni<?>> unis)
Combines several
unis together. |
UniAndGroupIterable |
unis(Uni<?>... unis)
Combines several
unis together. |
<T1,T2> UniAndGroup2<T1,T2> |
unis(Uni<? extends T1> u1,
Uni<? extends T2> u2)
Combines two
unis together. |
<T1,T2,T3> UniAndGroup3<T1,T2,T3> |
unis(Uni<? extends T1> u1,
Uni<? extends T2> u2,
Uni<? extends T3> u3)
Combines the three
unis together. |
<T1,T2,T3,T4> |
unis(Uni<? extends T1> u1,
Uni<? extends T2> u2,
Uni<? extends T3> u3,
Uni<? extends T4> u4)
Combines four
unis together. |
<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 five
unis together. |
public static final UniZip INSTANCE
public <T1,T2> UniAndGroup2<T1,T2> unis(Uni<? extends T1> u1, Uni<? extends T2> u2)
unis together.
Once both Uni have completed successfully, the item can be retrieved as a
Tuple2 or computed using a BiFunction.
The produced Uni fires a failure event if one of the Unis fires a failure. This
will cause the other Uni to be cancelled, expect if UniAndGroup2.collectFailures() is invoked
which delay the failure event until all Unis have fires an item or failure event. If several
unis fire a failure, the propagated failure is a CompositeException wrapping all the
collected failures.
T1 - the type of the item for the first uniT2 - the type of the item for the second uniu1 - the first uni, must not be nullu2 - the second uni, must not be nullUniAndGroup2 to configure the combinationpublic <T1,T2,T3> UniAndGroup3<T1,T2,T3> unis(Uni<? extends T1> u1, Uni<? extends T2> u2, Uni<? extends T3> u3)
unis together.
Once all Uni have completed successfully, the item can be retrieved as a Tuple3 or computed
using a Functions.Function3.
The produced Uni fires a failure event if one of the Unis fires a failure. This
will cause the other Uni to be cancelled, expect if UniAndGroup3.collectFailures() is invoked
which delay the failure event until all Unis have fires an item or failure event. If several
unis fire a failure, the propagated failure is a CompositeException wrapping all the
collected failures.
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 uniu1 - the first uni to be combined, must not be nullu2 - the second uni to be combined, must not be nullu3 - the third uni to be combined, must not be nullUniAndGroup3 to configure the combinationpublic <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)
unis together.
Once all Uni have completed successfully, the item can be retrieved as a Tuple4 or computed
using a Functions.Function4.
The produced Uni fires a failure event if one of the Unis fires a failure. This
will cause the other Uni to be cancelled, expect if UniAndGroup4.collectFailures() is invoked
which delay the failure event until all Unis have fires an item or failure event. If several
unis fire a failure, the propagated failure is a CompositeException wrapping all the
collected failures.
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 uniu1 - the first uni to be combined, must not be nullu2 - the second uni to be combined, must not be nullu3 - the third uni to be combined, must not be nullu4 - the fourth uni to be combined, must not be nullUniAndGroup4 to configure the combinationpublic <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)
unis together.
Once all Uni have completed successfully, the item can be retrieved as a Tuple4 or computed
using a Functions.Function4.
The produced Uni fires a failure event if one of the Unis fires a failure. This
will cause the other Uni to be cancelled, expect if UniAndGroup5.collectFailures() is invoked
which delay the failure event until all Unis have fires an item or failure event. If several
unis fire a failure, the propagated failure is a CompositeException wrapping all the
collected failures.
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 uniu1 - the first uni to be combined, must not be nullu2 - the second uni to be combined, must not be nullu3 - the third uni to be combined, must not be nullu4 - the fourth uni to be combined, must not be nullu5 - the fifth uni to be combined, must not be nullUniAndGroup5 to configure the combinationpublic UniAndGroupIterable unis(Uni<?>... unis)
unis together.
Once all Uni have completed successfully, the item is computed using a combinator function.
The produced Uni fires a failure event if one of the Unis fires a failure. This
will cause the other Uni to be cancelled, expect if UniAndGroupIterable.collectFailures() is invoked
which delay the failure event until all Unis have fires an item or failure event. If several
unis fire a failure, the propagated failure is a CompositeException wrapping all the
collected failures.
unis - the list of unis, must not be null, must not contain null, must not be emptyUniAndGroupIterable to configure the combinationpublic <O> UniAndGroupIterable<O> unis(Iterable<? extends Uni<?>> unis)
unis together.
Once all Uni have completed successfully, the item is computed using a combinator function.
The produced Uni fires a failure event if one of the Unis fires a failure. This
will cause the other Uni to be cancelled, expect if UniAndGroupIterable.collectFailures() is invoked
which delay the failure event until all Unis have fires an item or failure event. If several
unis fire a failure, the propagated failure is a CompositeException wrapping all the
collected failures.
O - the type of itemunis - the list of unis, must not be null, must not contain null, must not be emptyUniAndGroupIterable to configure the combinationCopyright © 2019–2020 SmallRye. All rights reserved.