System wide materializer (#27491)
Introduces a materializer started through an extension and then an implicit conversion for Scala turning an implicitly available ActorSystem into a materializer. The Java APIs has been ammended with run-methods accepting an ActorSystem.
This commit is contained in:
parent
77d1d33dbc
commit
45c826a218
196 changed files with 1148 additions and 1129 deletions
|
|
@ -23,19 +23,16 @@ public class StreamBuffersRateDocTest extends AbstractJavaTest {
|
|||
static class Job {}
|
||||
|
||||
static ActorSystem system;
|
||||
static Materializer mat;
|
||||
|
||||
@BeforeClass
|
||||
public static void setup() {
|
||||
system = ActorSystem.create("StreamBuffersDocTest");
|
||||
mat = ActorMaterializer.create(system);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void tearDown() {
|
||||
TestKit.shutdownActorSystem(system);
|
||||
system = null;
|
||||
mat = null;
|
||||
}
|
||||
|
||||
final SilenceSystemOut.System System = SilenceSystemOut.get();
|
||||
|
|
@ -62,7 +59,7 @@ public class StreamBuffersRateDocTest extends AbstractJavaTest {
|
|||
return i;
|
||||
})
|
||||
.async()
|
||||
.runWith(Sink.ignore(), mat);
|
||||
.runWith(Sink.ignore(), system);
|
||||
// #pipelining
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +106,7 @@ public class StreamBuffersRateDocTest extends AbstractJavaTest {
|
|||
b.from(zipper.out()).to(b.add(Sink.foreach(elem -> System.out.println(elem))));
|
||||
return ClosedShape.getInstance();
|
||||
}))
|
||||
.run(mat);
|
||||
.run(system);
|
||||
// #buffering-abstraction-leak
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue