doc Replace the word stage by operator in stream doc (#25138)

This commit is contained in:
Richard Imaoka 2018-05-29 17:00:48 +09:00 committed by Arnout Engelen
parent 1919f222fa
commit a17a61557c
142 changed files with 341 additions and 341 deletions

View file

@ -287,14 +287,14 @@ class GraphStageDocSpec extends AkkaSpec {
"Demonstrate chaining of graph stages" in {
val sink = Sink.fold[List[Int], Int](List.empty[Int])((acc, n) acc :+ n)
//#graph-stage-chain
//#graph-operator-chain
val resultFuture = Source(1 to 5)
.via(new Filter(_ % 2 == 0))
.via(new Duplicator())
.via(new Map(_ / 2))
.runWith(sink)
//#graph-stage-chain
//#graph-operator-chain
Await.result(resultFuture, 3.seconds) should ===(List(1, 1, 2, 2))
}

View file

@ -15,7 +15,7 @@ class GraphStageLoggingDocSpec extends AkkaSpec("akka.loglevel = DEBUG") {
implicit val materializer = ActorMaterializer()
implicit val ec = system.dispatcher
//#stage-with-logging
//#operator-with-logging
import akka.stream.stage.{ GraphStage, GraphStageLogic, OutHandler, StageLogging }
final class RandomLettersSource extends GraphStage[SourceShape[String]] {
@ -39,7 +39,7 @@ class GraphStageLoggingDocSpec extends AkkaSpec("akka.loglevel = DEBUG") {
def nextChar(): Char =
ThreadLocalRandom.current().nextInt('a', 'z'.toInt + 1).toChar
}
//#stage-with-logging
//#operator-with-logging
"demonstrate logging in custom graphstage" in {
val n = 10