public class MultiGroupIntoLists<T> extends Object
| Constructor and Description |
|---|
MultiGroupIntoLists(Multi<T> upstream) |
public Multi<List<T>> every(Duration duration)
Multi that emits lists of items collected from the observed Multi.
The resulting Multi emits connected, non-overlapping lists, 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 list is emitted by the returned Multi.
When the upstream Multi sends the completion event, the resulting Multi emits the current list
and propagates the completion event.
If the upstream Multi sends a failure, the failure is propagated immediately.
duration - the period of time each list collects items before it is emitted and replaced with a new
list. Must be non null and positive.duration with the items emitted by the upstream multi during the time
window.public Multi<List<T>> of(int size)
Multi that emits lists of items collected from the observed Multi.
The resulting Multi emits lists every size items.
When the upstream Multi sends the completion event, the produced Multi emits the current list,
and sends the completion event. This last list 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 size of each collected list, must be positivesize items from the upstream Multi.public Multi<List<T>> of(int size, int skip)
Multi that emits lists of items collected from the observed Multi.
The resulting Multi emits lists every skip items, each containing size items.
When the upstream Multi sends the completion event, the produced Multi emits the current list,
and sends the completion event. This last list 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 size of each collected list, must be positive and non-0skip - the number of items skipped before starting a new list. If skip and size are equal,
this operation is similar to of(int). Must be positive and non-0skip items from the upstream Multi. Each list contains at most
size itemsCopyright © 2019–2020 SmallRye. All rights reserved.