Class UniJoin
- java.lang.Object
-
- io.smallrye.mutiny.groups.UniJoin
-
@Experimental("New API based on observations that Uni.combine() is often used with homogeneous types, and combination often just a mapping to a collection.") public class UniJoin extends java.lang.ObjectJoin multipleUnis.Note about emptiness: If the set of Unis is empty, the set is rejected. Joining an empty set would not propagate any event as it would not subscribe to anything. As a result, you cannot join empty sets of Unis. An
IllegalArgumentExceptionwill be thrown in this case.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classUniJoin.Builder<T>Builder to assembleUnireferences to be joined.static classUniJoin.JoinAllStrategy<T>static interfaceUniJoin.JoinAllStrategyTerminal<T>Terminal interface forall(List)static classUniJoin.JoinFirstStrategy<T>Defines how to deal with failures while joiningUnireferences withfirst(List)}.static interfaceUniJoin.JoinFirstStrategyTerminal<T>Terminal interface forfirst(List)
-
Field Summary
Fields Modifier and Type Field Description static UniJoinSHARED_INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> UniJoin.JoinAllStrategy<T>all(Uni<T>... unis)<T> UniJoin.JoinAllStrategy<T>all(java.util.List<Uni<T>> unis)Join multipleUnireferences and emit a list of values.<T> UniJoin.Builder<T>builder()Provide a builder to assemble theUnireferences to join.<T> UniJoin.JoinFirstStrategy<T>first(Uni<T>... unis)Join multipleUniand emit the result from the first one to emit a signal, or the first one with a value.<T> UniJoin.JoinFirstStrategy<T>first(java.util.List<Uni<T>> unis)Join multipleUniand emit the result from the first one to emit a signal, or the first one with a value.
-
-
-
Field Detail
-
SHARED_INSTANCE
public static final UniJoin SHARED_INSTANCE
-
-
Method Detail
-
all
@SafeVarargs @CheckReturnValue public final <T> UniJoin.JoinAllStrategy<T> all(Uni<T>... unis)
-
all
@CheckReturnValue public final <T> UniJoin.JoinAllStrategy<T> all(java.util.List<Uni<T>> unis)
Join multipleUnireferences and emit a list of values.The resulting list of values is in order of the list of
Uni. What happens when any of theUniemits a failure rather than a value is specified by a subsequent call to any of the methods inUniJoin.JoinAllStrategy.The list of
Unismust not benull, empty, or containnullobjects.
-
first
@SafeVarargs @CheckReturnValue public final <T> UniJoin.JoinFirstStrategy<T> first(Uni<T>... unis)
Join multipleUniand emit the result from the first one to emit a signal, or the first one with a value. This is a convenience delegate method forfirst(List).The list of
Unismust not benull, empty, or containnullobjects.
-
first
@CheckReturnValue public final <T> UniJoin.JoinFirstStrategy<T> first(java.util.List<Uni<T>> unis)
Join multipleUniand emit the result from the first one to emit a signal, or the first one with a value.What happens when any of the
Uniemits a failure rather than a value is specified by a subsequent call to any of the methods inUniJoin.JoinFirstStrategy.The list of
Unismust not benull, empty, or containnullobjects.
-
builder
@CheckReturnValue public <T> UniJoin.Builder<T> builder()
Provide a builder to assemble theUnireferences to join.- Type Parameters:
T- the type of theUnivalues- Returns:
- a new builder
-
-