-
Constructor Details
-
MultiGroupIntoMultis
-
-
Method Details
-
every
Creates aMultithat emitsMultiof items collected from the observedMulti.The resulting
Multiemits connected, non-overlapping stream of items, each of a fixed duration specified by thedurationparameter. If, during the configured time window, no items are emitted by the upstreamMulti, an emptyMultiis emitted by the returnedMulti.When the upstream
Multisends the completion event, the resultingMultiemits the currentMultiand propagates the completion event.If the upstream
Multisends a failure, the failure is propagated immediately.- Parameters:
duration- the period of time each Multi collects items before it is emitted and replaced with a new Multi. Must be nonnulland positive.- Returns:
- a Multi that emits every
durationwith the items emitted by the upstream multi during the time window.
-
of
Creates aMultithat emits windows of items collected from the observedMulti.The resulting
Multiemitsmultisofsizeconsecutive and non-overlapping items. Each emittedMultiis completed once the last item is emitted.When the upstream
Multisends the completion event, theMultiemits the current Multi (and the completion event) and sends the completion event. This lastMultimay not containsizeitems. If the upstreamMultisends the completion event before having emitted any event, the completion event is propagated immediately.If the upstream
Multisends a failure, the failure is propagated immediately.- Parameters:
size- the max number of item in each emittedMulti, must be positive- Returns:
- a Multi emitting multis of at most
sizeitems from the upstream Multi.
-
of
Creates aMultithat emits windows of items collected from the observedMulti.The resulting
Multiemitsmultiseveryskipitems, each containingsizeitems. Each emittedMultiis completed once the last item is emitted.When the upstream
Multisends the completion event, theMultiemits the current Multi (and the completion event) and sends the completion event. This lastMultimay not containsizeitems. If the upstreamMultisends the completion event before having emitted any event, the completion event is propagated immediately.If the upstream
Multisends a failure, the failure is propagated immediately.- Parameters:
size- the max number of item in each emittedMulti, must be positiveskip- the number of items skipped before starting a new multi. Ifskipandsizeare equal, this operation is similar toof(int). Must be positive and non-0- Returns:
- a Multi emitting multis of at most
sizeitems from the upstream Multi.
-