def lazyInitAsync[T, M](sinkFactory: () => Future[Sink[T, M]]): Sink[T, Future[Option[M]]]
lazyInitAsync has been deprecated in 2.6.0, use lazyFutureSink instead.
Creates a real
Sink upon receiving the first element. Internal
Sink will not be created if there are no elements, because of completion or error.
- If upstream completes before an element was received then the
CompletionStageis completed with
- If upstream fails before an element was received,
sinkFactorythrows an exception, or materialization of the internal sink fails then the
CompletionStageis completed with the exception.
- Otherwise the
CompletionStageis completed with the materialized value of the internal sink.
backpressures when initialized and when created sink backpressures