Skip to content

Commit

Permalink
akka#20885 GraphDSLDocTest comment wording improved
Browse files Browse the repository at this point in the history
  • Loading branch information
gosubpl committed Jul 6, 2016
1 parent 7d5b32e commit 40ba1e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions akka-docs/rst/java/code/docs/stream/GraphDSLDocTest.java
Expand Up @@ -57,17 +57,17 @@ public void demonstrateBuildSimpleGraph() throws Exception {

final RunnableGraph<CompletionStage<List<String>>> result =
RunnableGraph.fromGraph(
GraphDSL
.create(
sink, // previously created sink
GraphDSL // create() function binds sink, out which is sink's out port and builder DSL
.create( // we need to reference out's shape in the builder DSL below (in to() function)
sink, // previously created sink (Sink)
(builder, out) -> { // variables: builder (GraphDSL.Builder) and out (SinkShape)
final UniformFanOutShape<Integer, Integer> bcast = builder.add(Broadcast.create(2));
final UniformFanInShape<Integer, Integer> merge = builder.add(Merge.create(2));

final Outlet<Integer> source = builder.add(in).out();
builder.from(source).via(builder.add(f1))
.viaFanOut(bcast).via(builder.add(f2)).viaFanIn(merge)
.via(builder.add(f3.grouped(1000))).to(out); // to expects a SinkShape
.via(builder.add(f3.grouped(1000))).to(out); // to() expects a SinkShape
builder.from(bcast).via(builder.add(f4)).toFanIn(merge);
return ClosedShape.getInstance();
}));
Expand Down

0 comments on commit 40ba1e5

Please sign in to comment.