Package akka.stream
Class ActorMaterializerSettings
- java.lang.Object
-
- akka.stream.ActorMaterializerSettings
-
public final class ActorMaterializerSettings extends java.lang.ObjectEach 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 usingAttributes.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
-
-
Constructor Summary
Constructors Constructor Description 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.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.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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ActorMaterializerSettingsapply(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.Create the settings using the apply(system) or apply(config) method, and then modify them using the .with methods.static ActorMaterializerSettingsapply(ActorSystem system)CreateActorMaterializerSettingsfrom the settings of anActorSystem(Scala).static ActorMaterializerSettingsapply(com.typesafe.config.Config config)CreateActorMaterializerSettingsfrom a Config subsection (Scala).booleanautoFusing()java.lang.StringblockingIoDispatcher()static ActorMaterializerSettingscreate(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.Create the settings using the create(system) or create(config) method, and then modify them using the .with methods.static ActorMaterializerSettingscreate(ActorSystem system)CreateActorMaterializerSettingsfrom the settings of anActorSystem(Java).static ActorMaterializerSettingscreate(com.typesafe.config.Config config)CreateActorMaterializerSettingsfrom a Config subsection (Java).booleandebugLogging()java.lang.Stringdispatcher()booleanequals(java.lang.Object other)booleanfuzzingMode()intinitialInputBufferSize()IOSettingsioSettings()intmaxFixedBufferSize()intmaxInputBufferSize()intoutputBurstLimit()StreamRefSettingsstreamRefSettings()StreamSubscriptionTimeoutSettingssubscriptionTimeoutSettings()scala.Function1<java.lang.Throwable,Supervision.Directive>supervisionDecider()intsyncProcessingLimit()java.lang.StringtoString()ActorMaterializerSettingswithAutoFusing(boolean enable)Deprecated.Turning off fusing is no longer possible with the traversal based materializer.ActorMaterializerSettingswithBlockingIoDispatcher(java.lang.String newBlockingIoDispatcher)ActorMaterializerSettingswithDebugLogging(boolean enable)Enable to log all elements that are dropped due to failures (at DEBUG level).ActorMaterializerSettingswithDispatcher(java.lang.String dispatcher)This setting configures the default dispatcher to be used by streams materialized with theActorMaterializer.ActorMaterializerSettingswithFuzzing(boolean enable)Test utility: fuzzing mode means that GraphStage events are not processed in FIFO order within a fused subgraph, but randomized.ActorMaterializerSettingswithInputBuffer(int initialSize, int maxSize)Each asynchronous piece of a materialized stream topology is executed by one Actor that manages an input buffer for all inlets of its shape.ActorMaterializerSettingswithIOSettings(IOSettings ioSettings)ActorMaterializerSettingswithMaxFixedBufferSize(int size)Configure the maximum buffer size for which a FixedSizeBuffer will be preallocated.ActorMaterializerSettingswithOutputBurstLimit(int limit)Maximum number of elements emitted in batch if downstream signals large demand.ActorMaterializerSettingswithStreamRefSettings(StreamRefSettings streamRefSettings)ActorMaterializerSettingswithSubscriptionTimeoutSettings(StreamSubscriptionTimeoutSettings settings)Leaked publishers and subscribers are cleaned up when they are not used within a given deadline, configured byStreamSubscriptionTimeoutSettings.ActorMaterializerSettingswithSupervisionStrategy(Function<java.lang.Throwable,Supervision.Directive> decider)Java API: Decides how exceptions from application code are to be handled, unless overridden for specific flows of the stream operations withakka.stream.Attributes#supervisionStrategy.ActorMaterializerSettingswithSupervisionStrategy(scala.Function1<java.lang.Throwable,Supervision.Directive> decider)Scala API: Decides how exceptions from application code are to be handled, unless overridden for specific flows of the stream operations withakka.stream.Attributes#supervisionStrategy.ActorMaterializerSettingswithSyncProcessingLimit(int limit)Limit for number of messages that can be processed synchronously in stream to substream communication
-
-
-
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.Create the settings using the apply(system) or apply(config) method, and then modify them using the .with methods. Since 2.5.10.
-
apply
public static ActorMaterializerSettings apply(ActorSystem system)
CreateActorMaterializerSettingsfrom the settings of anActorSystem(Scala).- Parameters:
system- (undocumented)- Returns:
- (undocumented)
-
apply
public static ActorMaterializerSettings apply(com.typesafe.config.Config config)
CreateActorMaterializerSettingsfrom a Config subsection (Scala).- Parameters:
config- (undocumented)- Returns:
- (undocumented)
-
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.Create the settings using the create(system) or create(config) method, and then modify them using the .with methods. Since 2.5.10.CreateActorMaterializerSettingsfrom individual settings (Java).- Parameters:
initialInputBufferSize- (undocumented)maxInputBufferSize- (undocumented)dispatcher- (undocumented)supervisionDecider- (undocumented)subscriptionTimeoutSettings- (undocumented)debugLogging- (undocumented)outputBurstLimit- (undocumented)fuzzingMode- (undocumented)autoFusing- (undocumented)maxFixedBufferSize- (undocumented)- Returns:
- (undocumented)
-
create
public static ActorMaterializerSettings create(ActorSystem system)
CreateActorMaterializerSettingsfrom the settings of anActorSystem(Java).- Parameters:
system- (undocumented)- Returns:
- (undocumented)
-
create
public static ActorMaterializerSettings create(com.typesafe.config.Config config)
CreateActorMaterializerSettingsfrom a Config subsection (Java).- Parameters:
config- (undocumented)- Returns:
- (undocumented)
-
initialInputBufferSize
public int initialInputBufferSize()
-
maxInputBufferSize
public int maxInputBufferSize()
-
dispatcher
public java.lang.String dispatcher()
-
supervisionDecider
public scala.Function1<java.lang.Throwable,Supervision.Directive> supervisionDecider()
-
subscriptionTimeoutSettings
public StreamSubscriptionTimeoutSettings subscriptionTimeoutSettings()
-
debugLogging
public boolean debugLogging()
-
outputBurstLimit
public int outputBurstLimit()
-
fuzzingMode
public boolean fuzzingMode()
-
autoFusing
public boolean autoFusing()
-
maxFixedBufferSize
public int maxFixedBufferSize()
-
syncProcessingLimit
public int syncProcessingLimit()
-
ioSettings
public IOSettings ioSettings()
-
streamRefSettings
public StreamRefSettings streamRefSettings()
-
blockingIoDispatcher
public java.lang.String blockingIoDispatcher()
-
withInputBuffer
public ActorMaterializerSettings withInputBuffer(int initialSize, int maxSize)
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 usingAttributes.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
- Parameters:
initialSize- (undocumented)maxSize- (undocumented)- Returns:
- (undocumented)
-
withDispatcher
public ActorMaterializerSettings withDispatcher(java.lang.String dispatcher)
This setting configures the default dispatcher to be used by streams materialized with theActorMaterializer. This can be overridden for individual parts of the stream topology by usingakka.stream.Attributes#dispatcher.- Parameters:
dispatcher- (undocumented)- Returns:
- (undocumented)
-
withSupervisionStrategy
public ActorMaterializerSettings withSupervisionStrategy(scala.Function1<java.lang.Throwable,Supervision.Directive> decider)
Scala API: Decides how exceptions from application code are to be handled, unless overridden for specific flows of the stream operations withakka.stream.Attributes#supervisionStrategy.Note that supervision in streams are implemented on a per operator basis and is not supported by every operator.
- Parameters:
decider- (undocumented)- Returns:
- (undocumented)
-
withSupervisionStrategy
public ActorMaterializerSettings withSupervisionStrategy(Function<java.lang.Throwable,Supervision.Directive> decider)
Java API: Decides how exceptions from application code are to be handled, unless overridden for specific flows of the stream operations withakka.stream.Attributes#supervisionStrategy.Note that supervision in streams are implemented on a per operator basis and is not supported by every operator.
- Parameters:
decider- (undocumented)- Returns:
- (undocumented)
-
withFuzzing
public ActorMaterializerSettings withFuzzing(boolean enable)
Test utility: fuzzing mode means that GraphStage events are not processed in FIFO order within a fused subgraph, but randomized.- Parameters:
enable- (undocumented)- Returns:
- (undocumented)
-
withOutputBurstLimit
public ActorMaterializerSettings withOutputBurstLimit(int limit)
Maximum number of elements emitted in batch if downstream signals large demand.- Parameters:
limit- (undocumented)- Returns:
- (undocumented)
-
withSyncProcessingLimit
public ActorMaterializerSettings withSyncProcessingLimit(int limit)
Limit for number of messages that can be processed synchronously in stream to substream communication- Parameters:
limit- (undocumented)- Returns:
- (undocumented)
-
withDebugLogging
public ActorMaterializerSettings withDebugLogging(boolean enable)
Enable to log all elements that are dropped due to failures (at DEBUG level).- Parameters:
enable- (undocumented)- Returns:
- (undocumented)
-
withAutoFusing
public ActorMaterializerSettings withAutoFusing(boolean enable)
Deprecated.Turning off fusing is no longer possible with the traversal based materializer. Since 2.5.0.Enable automatic fusing of all graphs that are run. For short-lived streams this may cause an initial runtime overhead, but most of the time fusing is desirable since it reduces the number of Actors that are created.- Parameters:
enable- (undocumented)- Returns:
- (undocumented)
-
withMaxFixedBufferSize
public ActorMaterializerSettings withMaxFixedBufferSize(int size)
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.- Parameters:
size- (undocumented)- Returns:
- (undocumented)
-
withSubscriptionTimeoutSettings
public ActorMaterializerSettings withSubscriptionTimeoutSettings(StreamSubscriptionTimeoutSettings settings)
Leaked publishers and subscribers are cleaned up when they are not used within a given deadline, configured byStreamSubscriptionTimeoutSettings.- Parameters:
settings- (undocumented)- Returns:
- (undocumented)
-
withIOSettings
public ActorMaterializerSettings withIOSettings(IOSettings ioSettings)
-
withStreamRefSettings
public ActorMaterializerSettings withStreamRefSettings(StreamRefSettings streamRefSettings)
-
withBlockingIoDispatcher
public ActorMaterializerSettings withBlockingIoDispatcher(java.lang.String newBlockingIoDispatcher)
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-