Skip to content

Commit

Permalink
Remove mention of materializer from streams quickstart (akka#29169)
Browse files Browse the repository at this point in the history
  • Loading branch information
raboof authored Jun 4, 2020
1 parent 33d64f9 commit d73ae8d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions akka-docs/src/main/paradox/stream/stream-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ Scala
Java
: @@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,
like this: `.run(materializer)`)]@java[passed in explicitly, like this: `.run(mat)`].
Materializing and running a stream always requires an `ActorSystem` to be @scala[in implicit scope (or passed in explicitly,
like this: `.runWith(sink)(system)`)]@java[passed in explicitly, like this: `.runWith(sink, system)`].

The complete snippet looks like this:

Expand Down Expand Up @@ -414,8 +414,7 @@ has also a type parameter of @scala[`Future[Int]`]@java[`CompletionStage<Integer

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
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`
to materialize and run the Flow. The value returned by calling `run()` on a @scala[`RunnableGraph[T]`]@java[`RunnableGraph<T>`] is of type `T`.
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`.
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.

Expand Down

0 comments on commit d73ae8d

Please sign in to comment.