FlatMapBatchesStreamExtension<T> extension
Extends the Stream class with the ability to convert each element to a Stream,
then listen to at most size
Stream at a time
and outputs their results in size
-sized batches, while maintaining
order within each batch — subsequent batches of Streams are only
listened to when the batch before it successfully completes.
- on
-
- Stream<
T>
- Stream<
Methods
-
flatMapBatches<
R> (Stream< R> transform(T value), int size) → Stream<List< R> > -
Available on Stream<
Convert each element to a Stream, then listen to at mostT> , provided by the FlatMapBatchesStreamExtension extensionsize
Stream at a time and outputs their results insize
-sized batches, while maintaining order within each batch — subsequent batches of Streams are only listened to when the batch before it successfully completes. Errors will be forwarded downstream. -
flatMapBatchesSingle<
R> (Single< R> transform(T value), int size) → Single<List< R> > -
Available on Stream<
Similar to flatMapBatches, but collect all output result batches into a List, and emit final result as a Single when source Stream emits done event.T> , provided by the FlatMapBatchesStreamExtension extension