Remove mention of materializer from streams quickstart (#29169)
This commit is contained in:
parent
33d64f9dba
commit
d73ae8ddb2
1 changed files with 3 additions and 4 deletions
|
|
@ -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:
|
||||
|
||||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue