- java.lang.Object
-
- io.smallrye.mutiny.groups.UniJoin.JoinAllStrategy<T>
-
- Type Parameters:
T
- the type of theUni
values
- All Implemented Interfaces:
UniJoin.JoinAllStrategyTerminal<T>
- Enclosing class:
- UniJoin
public static class UniJoin.JoinAllStrategy<T> extends java.lang.Object implements UniJoin.JoinAllStrategyTerminal<T>
Defines how to deal with failures while joiningUni
references withUniJoin.all(List)
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Uni<java.util.List<T>>
andCollectFailures()
Wait for allUni
references to terminate, and collect all failures in aCompositeException
.Uni<java.util.List<T>>
andFailFast()
UniJoin.JoinAllStrategyTerminal<T>
usingConcurrencyOf(int limit)
Limit the number of concurrent upstream subscriptions.
-
-
-
Method Detail
-
usingConcurrencyOf
@CheckReturnValue public UniJoin.JoinAllStrategyTerminal<T> usingConcurrencyOf(int limit)
Limit the number of concurrent upstream subscriptions.When not specified all upstream
Uni
are being subscribed when the joiningUni
is subscribed.Setting a limit is useful when you have a large number of
Uni
to join and their simultaneous subscriptions might overwhelm resources (e.g., database connections, etc).- Parameters:
limit
- the concurrency limit, must be strictly positive- Returns:
- an object to conclude the join strategy
-
andCollectFailures
@CheckReturnValue public Uni<java.util.List<T>> andCollectFailures()
Wait for allUni
references to terminate, and collect all failures in aCompositeException
.- Specified by:
andCollectFailures
in interfaceUniJoin.JoinAllStrategyTerminal<T>
- Returns:
- a new
Uni
-
andFailFast
@CheckReturnValue public Uni<java.util.List<T>> andFailFast()
Immediately forward the first failure from any of theUni
, and cancel the remainingUni
subscriptions, ignoring eventual subsequent failures.- Specified by:
andFailFast
in interfaceUniJoin.JoinAllStrategyTerminal<T>
- Returns:
- a new
Uni
-
-