!str #19037 rename FlowGraph to GraphDSL

This commit is contained in:
Roland Kuhn 2015-11-30 15:45:37 +01:00
parent 5895834d98
commit f00da4daac
92 changed files with 535 additions and 542 deletions

View file

@ -7,7 +7,7 @@ import akka.japi.Pair;
import akka.pattern.Patterns;
import akka.japi.tuple.Tuple4;
import akka.stream.*;
import akka.stream.javadsl.FlowGraph.Builder;
import akka.stream.javadsl.GraphDSL.Builder;
import akka.stream.stage.*;
import akka.japi.function.*;
import akka.stream.testkit.AkkaSpec;
@ -70,7 +70,7 @@ public class FlowGraphTest extends StreamTest {
final Sink<String, Publisher<String>> publisher = Sink.publisher(false);
final Source<String, BoxedUnit> source = Source.fromGraph(
FlowGraph.create(new Function<FlowGraph.Builder<BoxedUnit>, SourceShape<String>>() {
GraphDSL.create(new Function<GraphDSL.Builder<BoxedUnit>, SourceShape<String>>() {
@Override
public SourceShape<String> apply(Builder<BoxedUnit> b) throws Exception {
final UniformFanInShape<String, String> merge = b.add(Merge.<String>create(2));
@ -94,7 +94,7 @@ public class FlowGraphTest extends StreamTest {
final Iterable<String> input1 = Arrays.asList("A", "B", "C");
final Iterable<Integer> input2 = Arrays.asList(1, 2, 3);
RunnableGraph.fromGraph( FlowGraph.create(
RunnableGraph.fromGraph( GraphDSL.create(
new Function<Builder<BoxedUnit>,ClosedShape>() {
@Override
public ClosedShape apply(final Builder<BoxedUnit> b) throws Exception {
@ -129,7 +129,7 @@ public class FlowGraphTest extends StreamTest {
final Iterable<String> expected1 = Arrays.asList("A", "B", "C");
final Iterable<Integer> expected2 = Arrays.asList(1, 2, 3);
RunnableGraph.fromGraph(FlowGraph.create(
RunnableGraph.fromGraph(GraphDSL.create(
new Function<Builder<BoxedUnit>, ClosedShape>() {
@Override
public ClosedShape apply(final Builder<BoxedUnit> b) throws Exception {
@ -161,7 +161,7 @@ public class FlowGraphTest extends StreamTest {
final JavaTestKit probe1 = new JavaTestKit(system);
final JavaTestKit probe2 = new JavaTestKit(system);
RunnableGraph.fromGraph(FlowGraph.create(
RunnableGraph.fromGraph(GraphDSL.create(
new Function<Builder<BoxedUnit>, ClosedShape>() {
@Override
public ClosedShape apply(final Builder<BoxedUnit> b) throws Exception {
@ -204,7 +204,7 @@ public class FlowGraphTest extends StreamTest {
final JavaTestKit probe3 = new JavaTestKit(system);
final JavaTestKit probe4 = new JavaTestKit(system);
RunnableGraph.fromGraph(FlowGraph.create(
RunnableGraph.fromGraph(GraphDSL.create(
new Function<Builder<BoxedUnit>, ClosedShape>() {
@Override
public ClosedShape apply(final Builder<BoxedUnit> b) throws Exception {
@ -258,7 +258,7 @@ public class FlowGraphTest extends StreamTest {
}
});
final Future<Integer> future = RunnableGraph.fromGraph(FlowGraph.create(Sink.<Integer>head(),
final Future<Integer> future = RunnableGraph.fromGraph(GraphDSL.create(Sink.<Integer>head(),
new Function2<Builder<Future<Integer>>, SinkShape<Integer>, ClosedShape>() {
@Override
public ClosedShape apply(Builder<Future<Integer>> b, SinkShape<Integer> out) throws Exception {
@ -289,7 +289,7 @@ public class FlowGraphTest extends StreamTest {
});
final Future<Integer> future = RunnableGraph.fromGraph(
FlowGraph.create(Sink.<Integer>head(),
GraphDSL.create(Sink.<Integer>head(),
new Function2<Builder<Future<Integer>>, SinkShape<Integer>, ClosedShape>() {
@Override
public ClosedShape apply(Builder<Future<Integer>> b, SinkShape<Integer> out) throws Exception {
@ -314,7 +314,7 @@ public class FlowGraphTest extends StreamTest {
final TestProbe probe = TestProbe.apply(system);
final Future<Integer> future = RunnableGraph.fromGraph(
FlowGraph.create(Sink.<Integer> head(), new Function2<Builder<Future<Integer>>, SinkShape<Integer>, ClosedShape>() {
GraphDSL.create(Sink.<Integer> head(), new Function2<Builder<Future<Integer>>, SinkShape<Integer>, ClosedShape>() {
@Override
public ClosedShape apply(Builder<Future<Integer>> b, SinkShape<Integer> out) throws Exception {
b.from(b.add(Source.single(1))).to(out);