Sink.collection

Collect all values emitted from the stream into a collection.Operator only available in the Scala API. The closest operator in the Java API is Sink.seq.

Sink operators

Signature

def collection[T, That](implicit cbf: Factory[T, That with immutable.Iterable[_]]): Sink[T, Future[That]]

Description

Collect values emitted from the stream into an arbitrary collection That. The resulting collection is available through a Future[That] or when the stream completes. Note that the collection boundaries are those defined in the CanBuildFrom associated with the chosen collection. See The Architecture of Scala 2.13’s Collections for more info. The seq operator is a shorthand for Sink.collection[T, Vector[T]].Operator only available in the Scala API. The closest operator in the Java API is Sink.seq.

Reactive Streams semantics

cancels If too many values are collected

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.