Class Attributes$
- java.lang.Object
-
- org.apache.pekko.stream.Attributes$
-
- All Implemented Interfaces:
java.io.Serializable
public class Attributes$ extends java.lang.Object implements java.io.SerializableNote that more attributes for theMaterializerare defined inActorAttributes.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Attributes$MODULE$Static reference to the singleton instance of this Scala object.
-
Constructor Summary
Constructors Constructor Description Attributes$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description scala.collection.immutable.List<Attributes.Attribute>$lessinit$greater$default$1()Attributesapply(Attributes.Attribute attribute)INTERNAL APIAttributesapply(scala.collection.immutable.List<Attributes.Attribute> attributeList)scala.collection.immutable.List<Attributes.Attribute>apply$default$1()AttributesasyncBoundary()org.apache.pekko.stream.Attributes.CancellationStrategy.StrategycancellationStrategyAfterDelay(scala.concurrent.duration.FiniteDuration delay, org.apache.pekko.stream.Attributes.CancellationStrategy.Strategy strategy)Java APIorg.apache.pekko.stream.Attributes.CancellationStrategy.StrategycancellationStrategyCompleteState()Java APIorg.apache.pekko.stream.Attributes.CancellationStrategy.StrategycancellationStrategyFailStage()Java APIorg.apache.pekko.stream.Attributes.CancellationStrategy.StrategycancellationStrategyPropagateFailure()Java APIAttributescreateLogLevels(Logging.LogLevel onElement)Java APIAttributescreateLogLevels(Logging.LogLevel onElement, Logging.LogLevel onFinish, Logging.LogLevel onFailure)Java APIjava.lang.StringextractName(org.apache.pekko.stream.impl.TraversalBuilder builder, java.lang.String default_)Compute a name by concatenating all Name attributes that the given module has, returning the given default value if none are found.AttributesinputBuffer(int initial, int max)Each asynchronous piece of a materialized stream topology is executed by one Actor that manages an input buffer for all inlets of its shape.Logging.LogLevellogLevelDebug()Java API: Use to enable logging at DEBUG level for certain operations when configuringAttributes.createLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)Logging.LogLevellogLevelError()Java API: Use to enable logging at ERROR level for certain operations when configuringAttributes.createLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)Logging.LogLevellogLevelInfo()Java API: Use to enable logging at INFO level for certain operations when configuringAttributes.createLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)Logging.LogLevellogLevelOff()Java API: Use to disable logging on certain operations when configuringAttributes.createLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)AttributeslogLevels(Logging.LogLevel onElement, Logging.LogLevel onFinish, Logging.LogLevel onFailure)Configureslog()operator log-levels to be used when logging.Logging.LogLevellogLevels$default$1()Logging.LogLevellogLevels$default$2()Logging.LogLevellogLevels$default$3()Logging.LogLevellogLevelWarning()Java API: Use to enable logging at WARNING level for certain operations when configuringAttributes.createLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)Attributesname(java.lang.String name)Specifies the name of the operation.Attributes.NestedMaterializationCancellationPolicynestedMaterializationCancellationPolicyDefault()DefaultNestedMaterializationCancellationPolicy, please seepekko.stream.Attributes#nestedMaterializationCancellationPolicyEagerCancellation()for details.Attributes.NestedMaterializationCancellationPolicynestedMaterializationCancellationPolicyEagerCancellation()JAVA API ANestedMaterializationCancellationPolicythat configures graph stages delaying nested flow materialization to cancel immediately when downstream cancels before nested flow materialization.Attributes.NestedMaterializationCancellationPolicynestedMaterializationCancellationPolicyPropagateToNested()JAVA API ANestedMaterializationCancellationPolicythat configures graph stages delaying nested flow materialization to delay cancellation when downstream cancels before nested flow materialization.Attributesnone()INTERNAL APIscala.Option<scala.collection.immutable.List<Attributes.Attribute>>unapply(Attributes x$0)
-
-
-
Field Detail
-
MODULE$
public static final Attributes$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
$lessinit$greater$default$1
public scala.collection.immutable.List<Attributes.Attribute> $lessinit$greater$default$1()
-
cancellationStrategyCompleteState
public org.apache.pekko.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyCompleteState()
Java APIStrategy that treats
cancelStagethe same ascompleteStage, i.e. all inlets are cancelled (propagating the cancellation cause) and all outlets are regularly completed.This used to be the default behavior before Akka 2.6.
This behavior can be problematic in stacks of BidiFlows where different layers of the stack are both connected through inputs and outputs. In this case, an error in a doubly connected component triggers both a cancellation going upstream and an error going downstream. Since the stack might be connected to those components with inlets and outlets, a race starts whether the cancellation or the error arrives first. If the error arrives first, that's usually good because then the error can be propagated both on inlets and outlets. However, if the cancellation arrives first, the previous default behavior to complete the stage will lead other outputs to be completed regularly. The error which arrive late at the other hand will just be ignored (that connection will have been cancelled already and also the paths through which the error could propagates are already shut down).
-
cancellationStrategyFailStage
public org.apache.pekko.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyFailStage()
Java APIStrategy that treats
cancelStagethe same asfailStage, i.e. all inlets are cancelled (propagating the cancellation cause) and all outlets are failed propagating the cause from cancellation.
-
cancellationStrategyPropagateFailure
public org.apache.pekko.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyPropagateFailure()
Java APIStrategy that treats
cancelStagein different ways depending on the cause that was given to the cancellation.If the cause was a regular, active cancellation (
SubscriptionWithCancelException.NoMoreElementsNeeded), the stage receiving this cancellation is completed regularly.If another cause was given, this is treated as an error and the behavior is the same as with
failStage.This is a good default strategy.
-
cancellationStrategyAfterDelay
public org.apache.pekko.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyAfterDelay(scala.concurrent.duration.FiniteDuration delay, org.apache.pekko.stream.Attributes.CancellationStrategy.Strategy strategy)Java APIStrategy that allows to delay any action when
cancelStageis invoked.The idea of this strategy is to delay any action on cancellation because it is expected that the stage is completed through another path in the meantime. The downside is that a stage and a stream may live longer than expected if no such signal is received and cancellation is invoked later on. In streams with many stages that all apply this strategy, this strategy might significantly delay the propagation of a cancellation signal because each upstream stage might impose such a delay. During this time, the stream will be mostly "silent", i.e. it cannot make progress because of backpressure, but you might still be able observe a long delay at the ultimate source.
-
nestedMaterializationCancellationPolicyEagerCancellation
public Attributes.NestedMaterializationCancellationPolicy nestedMaterializationCancellationPolicyEagerCancellation()
JAVA API ANestedMaterializationCancellationPolicythat configures graph stages delaying nested flow materialization to cancel immediately when downstream cancels before nested flow materialization. This applies topekko.stream.scaladsl.FlowOps.flatMapPrefix,pekko.stream.scaladsl.Flow.futureFlowand derived operators.
-
nestedMaterializationCancellationPolicyPropagateToNested
public Attributes.NestedMaterializationCancellationPolicy nestedMaterializationCancellationPolicyPropagateToNested()
JAVA API ANestedMaterializationCancellationPolicythat configures graph stages delaying nested flow materialization to delay cancellation when downstream cancels before nested flow materialization. Once the nested flow is materialized it will be cancelled immediately. This applies topekko.stream.scaladsl.FlowOps.flatMapPrefix,pekko.stream.scaladsl.Flow.futureFlowand derived operators.
-
nestedMaterializationCancellationPolicyDefault
public Attributes.NestedMaterializationCancellationPolicy nestedMaterializationCancellationPolicyDefault()
DefaultNestedMaterializationCancellationPolicy, please seepekko.stream.Attributes#nestedMaterializationCancellationPolicyEagerCancellation()for details.
-
logLevelOff
public Logging.LogLevel logLevelOff()
Java API: Use to disable logging on certain operations when configuringAttributes.createLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)
-
logLevelError
public Logging.LogLevel logLevelError()
Java API: Use to enable logging at ERROR level for certain operations when configuringAttributes.createLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)
-
logLevelWarning
public Logging.LogLevel logLevelWarning()
Java API: Use to enable logging at WARNING level for certain operations when configuringAttributes.createLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)
-
logLevelInfo
public Logging.LogLevel logLevelInfo()
Java API: Use to enable logging at INFO level for certain operations when configuringAttributes.createLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)
-
logLevelDebug
public Logging.LogLevel logLevelDebug()
Java API: Use to enable logging at DEBUG level for certain operations when configuringAttributes.createLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)
-
apply
public Attributes apply(Attributes.Attribute attribute)
INTERNAL API
-
apply$default$1
public scala.collection.immutable.List<Attributes.Attribute> apply$default$1()
-
none
public Attributes none()
INTERNAL API
-
asyncBoundary
public Attributes asyncBoundary()
-
name
public Attributes name(java.lang.String name)
Specifies the name of the operation. If the name is null or empty the name is ignored, i.e.none()is returned.
-
inputBuffer
public Attributes inputBuffer(int initial, int max)
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 attribute configures the initial and maximal input buffer in number of elements for each inlet.
-
createLogLevels
public Attributes createLogLevels(Logging.LogLevel onElement, Logging.LogLevel onFinish, Logging.LogLevel onFailure)
Java APIConfigures
log()operator log-levels to be used when logging. Logging a certain operation can be completely disabled by usingAttributes.logLevelOff().
-
createLogLevels
public Attributes createLogLevels(Logging.LogLevel onElement)
Java APIConfigures
log()operator log-levels to be used when logging onElement. Logging a certain operation can be completely disabled by usingAttributes.logLevelOff().
-
logLevels
public Attributes logLevels(Logging.LogLevel onElement, Logging.LogLevel onFinish, Logging.LogLevel onFailure)
Configureslog()operator log-levels to be used when logging. Logging a certain operation can be completely disabled by usingLogLevels.Off.See
Attributes.createLogLevelsfor Java API
-
logLevels$default$1
public Logging.LogLevel logLevels$default$1()
-
logLevels$default$2
public Logging.LogLevel logLevels$default$2()
-
logLevels$default$3
public Logging.LogLevel logLevels$default$3()
-
extractName
public java.lang.String extractName(org.apache.pekko.stream.impl.TraversalBuilder builder, java.lang.String default_)Compute a name by concatenating all Name attributes that the given module has, returning the given default value if none are found.
-
apply
public Attributes apply(scala.collection.immutable.List<Attributes.Attribute> attributeList)
-
unapply
public scala.Option<scala.collection.immutable.List<Attributes.Attribute>> unapply(Attributes x$0)
-
-