java.lang.Object
io.smallrye.mutiny.groups.UniJoin.JoinFirstStrategy<T>
- Type Parameters:
T- the type of theUnivalues
- All Implemented Interfaces:
UniJoin.JoinFirstStrategyTerminal<T>
- Enclosing class:
UniJoin
public static class UniJoin.JoinFirstStrategy<T>
extends Object
implements UniJoin.JoinFirstStrategyTerminal<T>
Defines how to deal with failures while joining
Uni references with UniJoin.first(List)}.-
Method Summary
Modifier and TypeMethodDescriptionForward the value or failure from the firstUnito terminate.usingConcurrencyOf(int limit) Limit the number of concurrent upstream subscriptions.withItem()Forward the value from the firstUnito terminate with a value.
-
Method Details
-
usingConcurrencyOf
Limit the number of concurrent upstream subscriptions.When not specified all upstream
Uniare being subscribed when the joiningUniis subscribed.Setting a limit is useful when you have a large number of
Unito 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
-
toTerminate
Forward the value or failure from the firstUnito terminate.- Returns:
- a new
Uni
-
withItem
Forward the value from the firstUnito terminate with a value.When all
Unireferences fail then failures are collected into aCompositeException, which is then forwarded by the returnedUni.- Specified by:
withItemin interfaceUniJoin.JoinFirstStrategyTerminal<T>- Returns:
- a new
Uni
-