Materializer settings as attributes (#27499)
* Replace MaterializerSettings with Attributes #25559 * Field access to settings deprecated to make stages use attributes instead * Internal stages updated to use attributes * Docs on ActorMaterializerSettings updated to recommend away from using it * Verify all stages stopped after each testcase in FlowGroupBySpec * Subscription timeout attributes merged into one
This commit is contained in:
parent
b9a879d722
commit
aca63ea198
132 changed files with 1596 additions and 1116 deletions
|
|
@ -66,12 +66,6 @@ public class StreamBuffersRateDocTest extends AbstractJavaTest {
|
|||
@Test
|
||||
@SuppressWarnings("unused")
|
||||
public void demonstrateBufferSizes() {
|
||||
// #materializer-buffer
|
||||
final Materializer materializer =
|
||||
ActorMaterializer.create(
|
||||
ActorMaterializerSettings.create(system).withInputBuffer(64, 64), system);
|
||||
// #materializer-buffer
|
||||
|
||||
// #section-buffer
|
||||
final Flow<Integer, Integer, NotUsed> flow1 =
|
||||
Flow.of(Integer.class)
|
||||
|
|
@ -81,7 +75,13 @@ public class StreamBuffersRateDocTest extends AbstractJavaTest {
|
|||
final Flow<Integer, Integer, NotUsed> flow2 =
|
||||
flow1
|
||||
.via(Flow.of(Integer.class).map(elem -> elem / 2))
|
||||
.async(); // the buffer size of this map is the default
|
||||
.async(); // the buffer size of this map is the value from the surrounding graph it is
|
||||
// used in
|
||||
final RunnableGraph<NotUsed> runnableGraph =
|
||||
Source.range(1, 10).via(flow1).to(Sink.foreach(elem -> System.out.println(elem)));
|
||||
|
||||
final RunnableGraph<NotUsed> withOverridenDefaults =
|
||||
runnableGraph.withAttributes(Attributes.inputBuffer(64, 64));
|
||||
// #section-buffer
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue