Remove mention of materializer from streams quickstart (#29169)

This commit is contained in:
Arnout Engelen 2020-06-04 09:19:01 +02:00 committed by GitHub
parent 33d64f9dba
commit d73ae8ddb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -282,8 +282,8 @@ Scala
Java Java
: @@snip [TwitterStreamQuickstartDocTest.java](/akka-docs/src/test/java/jdocs/stream/TwitterStreamQuickstartDocTest.java) { #authors-foreach-println } : @@snip [TwitterStreamQuickstartDocTest.java](/akka-docs/src/test/java/jdocs/stream/TwitterStreamQuickstartDocTest.java) { #authors-foreach-println }
Materializing and running a stream always requires a `Materializer` to be @scala[in implicit scope (or passed in explicitly, Materializing and running a stream always requires an `ActorSystem` to be @scala[in implicit scope (or passed in explicitly,
like this: `.run(materializer)`)]@java[passed in explicitly, like this: `.run(mat)`]. like this: `.runWith(sink)(system)`)]@java[passed in explicitly, like this: `.runWith(sink, system)`].
The complete snippet looks like this: The complete snippet looks like this:
@ -414,8 +414,7 @@ has also a type parameter of @scala[`Future[Int]`]@java[`CompletionStage<Integer
This step does *not* yet materialize the This step does *not* yet materialize the
processing pipeline, it merely prepares the description of the Flow, which is now connected to a Sink, and therefore can processing pipeline, it merely prepares the description of the Flow, which is now connected to a Sink, and therefore can
be `run()`, as indicated by its type: @scala[`RunnableGraph[Future[Int]]`]@java[`RunnableGraph<CompletionStage<Integer>>`]. Next we call `run()` which uses the @scala[implicit] `Materializer` be `run()`, as indicated by its type: @scala[`RunnableGraph[Future[Int]]`]@java[`RunnableGraph<CompletionStage<Integer>>`]. Next we call `run()` which materializes and runs the Flow. The value returned by calling `run()` on a @scala[`RunnableGraph[T]`]@java[`RunnableGraph<T>`] is of type `T`.
to materialize and run the Flow. The value returned by calling `run()` on a @scala[`RunnableGraph[T]`]@java[`RunnableGraph<T>`] is of type `T`.
In our case this type is @scala[`Future[Int]`]@java[`CompletionStage<Integer>`] which, when completed, will contain the total length of our `tweets` stream. In our case this type is @scala[`Future[Int]`]@java[`CompletionStage<Integer>`] which, when completed, will contain the total length of our `tweets` stream.
In case of the stream failing, this future would complete with a Failure. In case of the stream failing, this future would complete with a Failure.