public class MultiGroupIntoMultis<T> extends Object
| Constructor and Description |
|---|
MultiGroupIntoMultis(Multi<T> upstream) |
public Multi<Multi<T>> every(Duration duration)
Multi that emits Multi of items collected from the observed Multi.
The resulting Multi emits connected, non-overlapping stream of items, each of a fixed duration specified
by the duration parameter. If, during the configured time window, no items are emitted by the upstream
Multi, an empty Multi is emitted by the returned Multi.
When the upstream Multi sends the completion event, the resulting Multi emits the current
Multi and propagates the completion event.
If the upstream Multi sends a failure, the failure is propagated immediately.
duration - the period of time each Multi collects items before it is emitted and replaced with a new
Multi. Must be non null and positive.duration with the items emitted by the upstream multi during the time
window.public Multi<Multi<T>> of(int size)
Multi that emits windows of items collected from the observed Multi.
The resulting Multi emits multis of size consecutive and non-overlapping items.
Each emitted Multi is completed once the last item is emitted.
When the upstream Multi sends the completion event, the Multi emits the current Multi (and the
completion event) and sends the completion event. This last Multi may not contain size items.
If the upstream Multi sends the completion event before having emitted any event, the completion event is
propagated immediately.
If the upstream Multi sends a failure, the failure is propagated immediately.
size - the max number of item in each emitted Multi, must be positivesize items from the upstream Multi.public Multi<Multi<T>> of(int size, int skip)
Multi that emits windows of items collected from the observed Multi.
The resulting Multi emits multis every skip items, each containing size
items. Each emitted Multi is completed once the last item is emitted.
When the upstream Multi sends the completion event, the Multi emits the current Multi (and the
completion event) and sends the completion event. This last Multi may not contain size items.
If the upstream Multi sends the completion event before having emitted any event, the completion event is
propagated immediately.
If the upstream Multi sends a failure, the failure is propagated immediately.
size - the max number of item in each emitted Multi, must be positiveskip - the number of items skipped before starting a new multi. If skip and size are equal,
this operation is similar to of(int). Must be positive and non-0size items from the upstream Multi.Copyright © 2019–2020 SmallRye. All rights reserved.