+str #17338 add OutputStreamSource and InputStreamSink

This commit is contained in:
Alexander Golubev 2015-07-12 23:04:26 -04:00
parent fc0ecfebef
commit 8ea52a6bb4
24 changed files with 1076 additions and 32 deletions

View file

@ -57,7 +57,7 @@ class StreamFileDocSpec extends AkkaSpec(UnboundedMailboxConfig) {
"configure dispatcher in code" in {
//#custom-dispatcher-code
SynchronousFileSink(file)
.withAttributes(ActorAttributes.dispatcher("custom-file-io-dispatcher"))
.withAttributes(ActorAttributes.dispatcher("custom-blocking-io-dispatcher"))
//#custom-dispatcher-code
}

View file

@ -118,7 +118,7 @@ Streaming data from a file is as easy as defining a `SynchronousFileSource` give
Please note that these processing stages are backed by Actors and by default are configured to run on a pre-configured
threadpool-backed dispatcher dedicated for File IO. This is very important as it isolates the blocking file IO operations from the rest
of the ActorSystem allowing each dispatcher to be utilised in the most efficient way. If you want to configure a custom
dispatcher for file IO operations globally, you can do so by changing the ``akka.stream.file-io-dispatcher``,
dispatcher for file IO operations globally, you can do so by changing the ``akka.stream.blocking-io-dispatcher``,
or for a specific stage by specifying a custom Dispatcher in code, like this:
.. includecode:: code/docs/stream/io/StreamFileDocSpec.scala#custom-dispatcher-code