!str #19137: Rename inlet and outlet to in and out on Flow/Source/SinkShape
This commit is contained in:
parent
3d20915cf4
commit
b478d70964
44 changed files with 272 additions and 247 deletions
|
|
@ -181,7 +181,7 @@ class MigrationsScala extends AkkaSpec {
|
|||
// absorbTermination turns into the code below.
|
||||
// This emulates the behavior of the AsyncStage stage.
|
||||
private def absorbTermination(): Unit =
|
||||
if (isAvailable(shape.outlet)) getHandler(out).onPull()
|
||||
if (isAvailable(shape.out)) getHandler(out).onPull()
|
||||
|
||||
// The line below emulates the behavior of the AsyncStage holdingDownstream
|
||||
private def holdingDownstream(): Boolean =
|
||||
|
|
|
|||
|
|
@ -78,13 +78,13 @@ class CompositionDocSpec extends AkkaSpec {
|
|||
//#complex-graph
|
||||
import GraphDSL.Implicits._
|
||||
RunnableGraph.fromGraph(GraphDSL.create() { implicit builder =>
|
||||
val A: Outlet[Int] = builder.add(Source.single(0)).outlet
|
||||
val A: Outlet[Int] = builder.add(Source.single(0)).out
|
||||
val B: UniformFanOutShape[Int, Int] = builder.add(Broadcast[Int](2))
|
||||
val C: UniformFanInShape[Int, Int] = builder.add(Merge[Int](2))
|
||||
val D: FlowShape[Int, Int] = builder.add(Flow[Int].map(_ + 1))
|
||||
val E: UniformFanOutShape[Int, Int] = builder.add(Balance[Int](2))
|
||||
val F: UniformFanInShape[Int, Int] = builder.add(Merge[Int](2))
|
||||
val G: Inlet[Any] = builder.add(Sink.foreach(println)).inlet
|
||||
val G: Inlet[Any] = builder.add(Sink.foreach(println)).in
|
||||
|
||||
C <~ F
|
||||
A ~> B ~> C ~> F
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ class FlowGraphDocSpec extends AkkaSpec {
|
|||
val broadcast = builder.add(Broadcast[Int](2))
|
||||
Source.single(1) ~> broadcast.in
|
||||
|
||||
broadcast.out(0) ~> sharedDoubler ~> topHS.inlet
|
||||
broadcast.out(1) ~> sharedDoubler ~> bottomHS.inlet
|
||||
broadcast.out(0) ~> sharedDoubler ~> topHS.in
|
||||
broadcast.out(1) ~> sharedDoubler ~> bottomHS.in
|
||||
ClosedShape
|
||||
})
|
||||
//#flow-graph-reusing-a-flow
|
||||
|
|
@ -207,7 +207,7 @@ class FlowGraphDocSpec extends AkkaSpec {
|
|||
val foldFlow: Flow[Int, Int, Future[Int]] = Flow.fromGraph(GraphDSL.create(Sink.fold[Int, Int](0)(_ + _)) {
|
||||
implicit builder ⇒
|
||||
fold ⇒
|
||||
FlowShape(fold.inlet, builder.materializedValue.mapAsync(4)(identity).outlet)
|
||||
FlowShape(fold.in, builder.materializedValue.mapAsync(4)(identity).outlet)
|
||||
})
|
||||
//#flow-graph-matvalue
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class StreamPartialFlowGraphDocSpec extends AkkaSpec {
|
|||
Source.single(1) ~> pm3.in(0)
|
||||
Source.single(2) ~> pm3.in(1)
|
||||
Source.single(3) ~> pm3.in(2)
|
||||
pm3.out ~> sink.inlet
|
||||
pm3.out ~> sink.in
|
||||
ClosedShape
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class StreamTcpDocSpec extends AkkaSpec {
|
|||
// then we continue using the echo-logic Flow
|
||||
echo.outlet ~> concat.in(1)
|
||||
|
||||
FlowShape(echo.inlet, concat.out)
|
||||
FlowShape(echo.in, concat.out)
|
||||
})
|
||||
|
||||
connection.handleWith(serverLogic)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue