Package akka.stream

Class ActorMaterializerSettings


  • public final class ActorMaterializerSettings
    extends java.lang.Object
    This class describes the configurable properties of the ActorMaterializer. Please refer to the withX methods for descriptions of the individual settings.

    The constructor is not public API, use create or apply on the ActorMaterializerSettings companion instead.

    • Constructor Detail

      • ActorMaterializerSettings

        public ActorMaterializerSettings​(int initialInputBufferSize,
                                         int maxInputBufferSize,
                                         java.lang.String dispatcher,
                                         scala.Function1<java.lang.Throwable,​Supervision.Directive> supervisionDecider,
                                         StreamSubscriptionTimeoutSettings subscriptionTimeoutSettings,
                                         boolean debugLogging,
                                         int outputBurstLimit,
                                         boolean fuzzingMode,
                                         boolean autoFusing,
                                         int maxFixedBufferSize,
                                         int syncProcessingLimit,
                                         IOSettings ioSettings)
        Deprecated.
        Use ActorMaterializerSettings.apply or ActorMaterializerSettings.create instead. Since 2.5.10.
      • ActorMaterializerSettings

        public ActorMaterializerSettings​(int initialInputBufferSize,
                                         int maxInputBufferSize,
                                         java.lang.String dispatcher,
                                         scala.Function1<java.lang.Throwable,​Supervision.Directive> supervisionDecider,
                                         StreamSubscriptionTimeoutSettings subscriptionTimeoutSettings,
                                         boolean debugLogging,
                                         int outputBurstLimit,
                                         boolean fuzzingMode,
                                         boolean autoFusing,
                                         int maxFixedBufferSize,
                                         int syncProcessingLimit)
        Deprecated.
        Use ActorMaterializerSettings.apply or ActorMaterializerSettings.create instead. Since 2.5.10.
      • ActorMaterializerSettings

        public ActorMaterializerSettings​(int initialInputBufferSize,
                                         int maxInputBufferSize,
                                         java.lang.String dispatcher,
                                         scala.Function1<java.lang.Throwable,​Supervision.Directive> supervisionDecider,
                                         StreamSubscriptionTimeoutSettings subscriptionTimeoutSettings,
                                         boolean debugLogging,
                                         int outputBurstLimit,
                                         boolean fuzzingMode,
                                         boolean autoFusing,
                                         int maxFixedBufferSize)
        Deprecated.
        Use ActorMaterializerSettings.apply or ActorMaterializerSettings.create instead. Since 2.5.10.
    • Method Detail

      • apply

        public static ActorMaterializerSettings apply​(int initialInputBufferSize,
                                                      int maxInputBufferSize,
                                                      java.lang.String dispatcher,
                                                      scala.Function1<java.lang.Throwable,​Supervision.Directive> supervisionDecider,
                                                      StreamSubscriptionTimeoutSettings subscriptionTimeoutSettings,
                                                      boolean debugLogging,
                                                      int outputBurstLimit,
                                                      boolean fuzzingMode,
                                                      boolean autoFusing,
                                                      int maxFixedBufferSize)
        Deprecated.
        Use config or attributes to configure the materializer. See migration guide for details https://doc.akka.io/libraries/akka-core/2.6/project/migration-guide-2.5.x-2.6.x.html. Since 2.6.0.
        Create ActorMaterializerSettings from individual settings (Scala).

        Prefer using either config for defaults or attributes for per-stream config. See migration guide for details https://doc.akka.io/libraries/akka-core/2.6/project/migration-guide-2.5.x-2.6.x.html"

      • apply

        public static ActorMaterializerSettings apply​(ActorSystem system)
        Deprecated.
        Use config or attributes to configure the materializer. See migration guide for details https://doc.akka.io/libraries/akka-core/2.6/project/migration-guide-2.5.x-2.6.x.html. Since 2.6.0.
        Create ActorMaterializerSettings from the settings of an ActorSystem (Scala).

        Prefer using either config for defaults or attributes for per-stream config. See migration guide for details https://doc.akka.io/libraries/akka-core/2.6/project/migration-guide-2.5.x-2.6.x.html"

      • apply

        public static ActorMaterializerSettings apply​(com.typesafe.config.Config config)
        Deprecated.
        Use config or attributes to configure the materializer. See migration guide for details https://doc.akka.io/libraries/akka-core/2.6/project/migration-guide-2.5.x-2.6.x.html. Since 2.6.0.
        Create ActorMaterializerSettings from a Config subsection (Scala).

        Prefer using either config for defaults or attributes for per-stream config. See migration guide for details https://doc.akka.io/libraries/akka-core/2.6/project/migration-guide-2.5.x-2.6.x.html"

      • create

        public static ActorMaterializerSettings create​(int initialInputBufferSize,
                                                       int maxInputBufferSize,
                                                       java.lang.String dispatcher,
                                                       scala.Function1<java.lang.Throwable,​Supervision.Directive> supervisionDecider,
                                                       StreamSubscriptionTimeoutSettings subscriptionTimeoutSettings,
                                                       boolean debugLogging,
                                                       int outputBurstLimit,
                                                       boolean fuzzingMode,
                                                       boolean autoFusing,
                                                       int maxFixedBufferSize)
        Deprecated.
        Use config or attributes to configure the materializer. See migration guide for details https://doc.akka.io/libraries/akka-core/2.6/project/migration-guide-2.5.x-2.6.x.html. Since 2.6.0.
        Create ActorMaterializerSettings from individual settings (Java).

        Prefer using either config for defaults or attributes for per-stream config. See migration guide for details https://doc.akka.io/libraries/akka-core/2.6/project/migration-guide-2.5.x-2.6.x.html"

      • create

        public static ActorMaterializerSettings create​(com.typesafe.config.Config config)
        Deprecated.
        Use config or attributes to configure the materializer. See migration guide for details https://doc.akka.io/libraries/akka-core/2.6/project/migration-guide-2.5.x-2.6.x.html. Since 2.6.0.
        Create ActorMaterializerSettings from a Config subsection (Java).

        Prefer using either config for defaults or attributes for per-stream config. See migration guide for details https://doc.akka.io/libraries/akka-core/2.6/project/migration-guide-2.5.x-2.6.x.html"

      • initialInputBufferSize

        public int initialInputBufferSize()
        Deprecated.
        Use attribute 'Attributes.InputBuffer' to read the concrete setting value. Since 2.6.0.
      • maxInputBufferSize

        public int maxInputBufferSize()
        Deprecated.
        Use attribute 'Attributes.InputBuffer' to read the concrete setting value. Since 2.6.0.
      • dispatcher

        public java.lang.String dispatcher()
        Deprecated.
        Use attribute 'ActorAttributes.Dispatcher' to read the concrete setting value. Since 2.6.0.
      • supervisionDecider

        public scala.Function1<java.lang.Throwable,​Supervision.Directive> supervisionDecider()
        Deprecated.
        Use attribute 'ActorAttributes.SupervisionStrategy' to read the concrete setting value. Since 2.6.0.
      • debugLogging

        public boolean debugLogging()
        Deprecated.
        Use attribute 'ActorAttributes.DebugLogging' to read the concrete setting value. Since 2.6.0.
      • outputBurstLimit

        public int outputBurstLimit()
        Deprecated.
        Use attribute 'ActorAttributes.OutputBurstLimit' to read the concrete setting value. Since 2.6.0.
      • fuzzingMode

        public boolean fuzzingMode()
        Deprecated.
        Use attribute 'ActorAttributes.FuzzingMode' to read the concrete setting value. Since 2.6.0.
      • autoFusing

        public boolean autoFusing()
        Deprecated.
        No longer has any effect. Since 2.6.0.
      • maxFixedBufferSize

        public int maxFixedBufferSize()
        Deprecated.
        Use attribute 'ActorAttributes.MaxFixedBufferSize' to read the concrete setting value. Since 2.6.0.
      • syncProcessingLimit

        public int syncProcessingLimit()
        Deprecated.
        Use attribute 'ActorAttributes.SyncProcessingLimit' to read the concrete setting value. Since 2.6.0.
      • blockingIoDispatcher

        public java.lang.String blockingIoDispatcher()
        Deprecated.
        Use attribute 'ActorAttributes.BlockingIoDispatcher' to read the concrete setting value. Since 2.6.0.
      • withInputBuffer

        public ActorMaterializerSettings withInputBuffer​(int initialSize,
                                                         int maxSize)
        Deprecated.
        Use attribute 'Attributes.InputBuffer' to change setting value. Since 2.6.0.
        Each asynchronous piece of a materialized stream topology is executed by one Actor that manages an input buffer for all inlets of its shape. This setting configures the default for initial and maximal input buffer in number of elements for each inlet. This can be overridden for individual parts of the stream topology by using Attributes.inputBuffer(int, int).

        FIXME: this is used for all kinds of buffers, not only the stream actor, some use initial some use max, document and or fix if it should not be like that. Search for get[Attributes.InputBuffer] to see how it is used

      • withDispatcher

        public ActorMaterializerSettings withDispatcher​(java.lang.String dispatcher)
        Deprecated.
        Use attribute 'ActorAttributes.Dispatcher' to change setting value. Since 2.6.0.
        This setting configures the default dispatcher to be used by streams materialized with the ActorMaterializer. This can be overridden for individual parts of the stream topology by using akka.stream.Attributes#dispatcher.
      • withSupervisionStrategy

        public ActorMaterializerSettings withSupervisionStrategy​(scala.Function1<java.lang.Throwable,​Supervision.Directive> decider)
        Deprecated.
        Use attribute 'ActorAttributes.supervisionStrategy' to change setting value. Since 2.6.0.
        Scala API: Decides how exceptions from application code are to be handled, unless overridden for specific flows of the stream operations with akka.stream.Attributes#supervisionStrategy.

        Note that supervision in streams are implemented on a per operator basis and is not supported by every operator.

      • withSupervisionStrategy

        public ActorMaterializerSettings withSupervisionStrategy​(Function<java.lang.Throwable,​Supervision.Directive> decider)
        Deprecated.
        Use attribute 'ActorAttributes.SupervisionStrategy' to change setting value. Since 2.6.0.
        Java API: Decides how exceptions from application code are to be handled, unless overridden for specific flows of the stream operations with akka.stream.Attributes#supervisionStrategy.

        Note that supervision in streams are implemented on a per operator basis and is not supported by every operator.

      • withFuzzing

        public ActorMaterializerSettings withFuzzing​(boolean enable)
        Deprecated.
        Use attribute 'ActorAttributes.FuzzingMode' to change setting value. Since 2.6.0.
        Test utility: fuzzing mode means that GraphStage events are not processed in FIFO order within a fused subgraph, but randomized.
      • withOutputBurstLimit

        public ActorMaterializerSettings withOutputBurstLimit​(int limit)
        Deprecated.
        Use attribute 'ActorAttributes.OutputBurstLimit' to change setting value. Since 2.6.0.
        Maximum number of elements emitted in batch if downstream signals large demand.
      • withSyncProcessingLimit

        public ActorMaterializerSettings withSyncProcessingLimit​(int limit)
        Deprecated.
        Use attribute 'ActorAttributes.SyncProcessingLimit' to change setting value. Since 2.6.0.
        Limit for number of messages that can be processed synchronously in stream to substream communication
      • withDebugLogging

        public ActorMaterializerSettings withDebugLogging​(boolean enable)
        Deprecated.
        Use attribute 'ActorAttributes.DebugLogging' to change setting value. Since 2.6.0.
        Enable to log all elements that are dropped due to failures (at DEBUG level).
      • withMaxFixedBufferSize

        public ActorMaterializerSettings withMaxFixedBufferSize​(int size)
        Deprecated.
        Use attribute 'ActorAttributes.MaxFixedBufferSize' to change setting value. Since 2.6.0.
        Configure the maximum buffer size for which a FixedSizeBuffer will be preallocated. This defaults to a large value because it is usually better to fail early when system memory is not sufficient to hold the buffer.
      • withBlockingIoDispatcher

        public ActorMaterializerSettings withBlockingIoDispatcher​(java.lang.String newBlockingIoDispatcher)
        Deprecated.
        Use attribute 'ActorAttributes.BlockingIoDispatcher' to change setting value. Since 2.6.0.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object