| Constructor and Description |
|---|
MultiBroadcast(Multi<T> upstream) |
| Modifier and Type | Method and Description |
|---|---|
Multi<T> |
toAllSubscribers()
Broadcasts the events of the upstream
Multi to all the subscribers. |
Multi<T> |
toAtLeast(int numberOfSubscribers)
Broadcasts the events of the upstream
Multi to several subscribers. |
MultiBroadcast<T> |
withCancellationAfterLastSubscriberDeparture()
Indicates that the subscription to the upstream
Multi is cancelled once all the subscribers have
cancelled their subscription. |
MultiBroadcast<T> |
withCancellationAfterLastSubscriberDeparture(Duration delay)
Indicates that the subscription to the upstream
Multi is cancelled once all the subscribers have
cancelled their subscription. |
public Multi<T> toAllSubscribers()
Multi to all the subscribers.
Subscribers start receiving the events as soon as they subscribe.Multi accepting several subscriberspublic Multi<T> toAtLeast(int numberOfSubscribers)
Multi to several subscribers.
Subscribers start receiving the events when at least numberOfSubscribers subscribes to the produced
Multi.numberOfSubscribers - the number of subscriber requires before subscribing to the upstream multi and start
dispatching the events. Must be strictly positive.Multi accepting several subscriberspublic MultiBroadcast<T> withCancellationAfterLastSubscriberDeparture()
Multi is cancelled once all the subscribers have
cancelled their subscription.MultiBroadcast.public MultiBroadcast<T> withCancellationAfterLastSubscriberDeparture(Duration delay)
Multi is cancelled once all the subscribers have
cancelled their subscription. Before cancelling it wait for a grace period of delay. If any subscriber
subscribes during this period, the cancellation will not happen.delay - the delay, must not be null, must be positiveMultiBroadcast.Copyright © 2019–2020 SmallRye. All rights reserved.