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
.
Signature
Sink.collection
Sink.collection
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