!str #19037 rename FlowGraph to GraphDSL
This commit is contained in:
parent
5895834d98
commit
f00da4daac
92 changed files with 535 additions and 542 deletions
|
|
@ -19,7 +19,7 @@ import scala.runtime.BoxedUnit;
|
|||
import akka.japi.Pair;
|
||||
import akka.stream.*;
|
||||
import akka.stream.testkit.AkkaSpec;
|
||||
import akka.stream.javadsl.FlowGraph.Builder;
|
||||
import akka.stream.javadsl.GraphDSL.Builder;
|
||||
import akka.japi.function.*;
|
||||
import akka.util.ByteString;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
|
@ -35,8 +35,8 @@ public class BidiFlowTest extends StreamTest {
|
|||
"FlowTest", AkkaSpec.testConf());
|
||||
|
||||
private final BidiFlow<Integer, Long, ByteString, String, BoxedUnit> bidi = BidiFlow
|
||||
.fromGraph(FlowGraph.create(
|
||||
new Function<FlowGraph.Builder<BoxedUnit>, BidiShape<Integer, Long, ByteString, String>>() {
|
||||
.fromGraph(GraphDSL.create(
|
||||
new Function<GraphDSL.Builder<BoxedUnit>, BidiShape<Integer, Long, ByteString, String>>() {
|
||||
@Override
|
||||
public BidiShape<Integer, Long, ByteString, String> apply(Builder<BoxedUnit> b)
|
||||
throws Exception {
|
||||
|
|
@ -61,8 +61,8 @@ public class BidiFlowTest extends StreamTest {
|
|||
|
||||
private final BidiFlow<Long, Integer, String, ByteString, BoxedUnit> inverse = BidiFlow
|
||||
.fromGraph(
|
||||
FlowGraph.create(
|
||||
new Function<FlowGraph.Builder<BoxedUnit>, BidiShape<Long, Integer, String, ByteString>>() {
|
||||
GraphDSL.create(
|
||||
new Function<GraphDSL.Builder<BoxedUnit>, BidiShape<Long, Integer, String, ByteString>>() {
|
||||
@Override
|
||||
public BidiShape<Long, Integer, String, ByteString> apply(Builder<BoxedUnit> b)
|
||||
throws Exception {
|
||||
|
|
@ -87,9 +87,9 @@ public class BidiFlowTest extends StreamTest {
|
|||
|
||||
private final BidiFlow<Integer, Long, ByteString, String, Future<Integer>> bidiMat =
|
||||
BidiFlow.fromGraph(
|
||||
FlowGraph.create(
|
||||
GraphDSL.create(
|
||||
Sink.<Integer>head(),
|
||||
new Function2<FlowGraph.Builder<Future<Integer>>, SinkShape<Integer>, BidiShape<Integer, Long, ByteString, String>>() {
|
||||
new Function2<GraphDSL.Builder<Future<Integer>>, SinkShape<Integer>, BidiShape<Integer, Long, ByteString, String>>() {
|
||||
@Override
|
||||
public BidiShape<Integer, Long, ByteString, String> apply(Builder<Future<Integer>> b, SinkShape<Integer> sink)
|
||||
throws Exception {
|
||||
|
|
@ -126,7 +126,7 @@ public class BidiFlowTest extends StreamTest {
|
|||
@Test
|
||||
public void mustWorkInIsolation() throws Exception {
|
||||
final Pair<Future<Long>, Future<String>> p =
|
||||
RunnableGraph.fromGraph(FlowGraph
|
||||
RunnableGraph.fromGraph(GraphDSL
|
||||
.create(Sink.<Long> head(), Sink.<String> head(),
|
||||
Keep.<Future<Long>, Future<String>> both(),
|
||||
new Function3<Builder<Pair<Future<Long>, Future<String>>>, SinkShape<Long>, SinkShape<String>, ClosedShape>() {
|
||||
|
|
@ -202,7 +202,7 @@ public class BidiFlowTest extends StreamTest {
|
|||
@Test
|
||||
public void mustMaterializeToItsValue() throws Exception {
|
||||
final Future<Integer> f = RunnableGraph.fromGraph(
|
||||
FlowGraph.create(bidiMat,
|
||||
GraphDSL.create(bidiMat,
|
||||
new Function2<Builder<Future<Integer> >, BidiShape<Integer, Long, ByteString, String>, ClosedShape>() {
|
||||
@Override
|
||||
public ClosedShape apply(Builder<Future<Integer>> b,
|
||||
|
|
@ -231,7 +231,7 @@ public class BidiFlowTest extends StreamTest {
|
|||
|
||||
@Test
|
||||
public void mustCombineMaterializationValues() throws Exception {
|
||||
final Flow<String, Integer, Future<Integer>> left = Flow.fromGraph(FlowGraph.create(
|
||||
final Flow<String, Integer, Future<Integer>> left = Flow.fromGraph(GraphDSL.create(
|
||||
Sink.<Integer>head(), new Function2<Builder<Future<Integer>>, SinkShape<Integer>, FlowShape<String, Integer>>() {
|
||||
@Override
|
||||
public FlowShape<String, Integer> apply(Builder<Future<Integer>> b,
|
||||
|
|
@ -251,7 +251,7 @@ public class BidiFlowTest extends StreamTest {
|
|||
return new FlowShape<String, Integer>(flow.inlet(), merge.out());
|
||||
}
|
||||
}));
|
||||
final Flow<Long, ByteString, Future<List<Long>>> right = Flow.fromGraph(FlowGraph.create(
|
||||
final Flow<Long, ByteString, Future<List<Long>>> right = Flow.fromGraph(GraphDSL.create(
|
||||
Sink.<List<Long>>head(), new Function2<Builder<Future<List<Long>>>, SinkShape<List<Long>>, FlowShape<Long, ByteString>>() {
|
||||
@Override
|
||||
public FlowShape<Long, ByteString> apply(Builder<Future<List<Long>>> b,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue