Class Attributes$
- java.lang.Object
-
- akka.stream.Attributes$
-
- All Implemented Interfaces:
java.io.Serializable
,scala.Serializable
public class Attributes$ extends java.lang.Object implements scala.Serializable
Cancellation strategies provide a way to configure the behavior of a stage whencancelStage
is called.It is only relevant for stream components that have more than one output and do not define a custom cancellation behavior by overriding
onDownstreamFinish
. In those cases, if the first output is cancelled, the default behavior is to callcancelStage
which shuts down the stage completely. The given strategy will allow customization of how the shutdown procedure should be done precisely.- 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()
Attributes
apply(Attributes.Attribute attribute)
INTERNAL APIAttributes
apply(scala.collection.immutable.List<Attributes.Attribute> attributeList)
scala.collection.immutable.List<Attributes.Attribute>
apply$default$1()
Attributes
asyncBoundary()
akka.stream.Attributes.CancellationStrategy.Strategy
cancellationStrategyAfterDelay(scala.concurrent.duration.FiniteDuration delay, akka.stream.Attributes.CancellationStrategy.Strategy strategy)
Strategy that allows to delay any action whencancelStage
is invoked.akka.stream.Attributes.CancellationStrategy.Strategy
cancellationStrategyCompleteState()
akka.stream.Attributes.CancellationStrategy.Strategy
cancellationStrategyFailStage()
Strategy that treatscancelStage
the same asfailStage
, i.e.Attributes
createLogLevels(Logging.LogLevel onElement)
Java APIAttributes
createLogLevels(Logging.LogLevel onElement, Logging.LogLevel onFinish, Logging.LogLevel onFailure)
Java APIjava.lang.String
extractName(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.Attributes
inputBuffer(int initial, int max)
Specifies the initial and maximum size of the input buffer.Logging.LogLevel
logLevelDebug()
Use to enable logging at DEBUG level for certain operations when configuringAttributes.createLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
Logging.LogLevel
logLevelError()
Use to enable logging at ERROR level for certain operations when configuringAttributes.createLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
Logging.LogLevel
logLevelInfo()
Use to enable logging at INFO level for certain operations when configuringAttributes.createLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
Logging.LogLevel
logLevelOff()
Attributes
logLevels(Logging.LogLevel onElement, Logging.LogLevel onFinish, Logging.LogLevel onFailure)
Configureslog()
operator log-levels to be used when logging.Logging.LogLevel
logLevels$default$1()
Logging.LogLevel
logLevels$default$2()
Logging.LogLevel
logLevels$default$3()
Logging.LogLevel
logLevelWarning()
Use to enable logging at WARNING level for certain operations when configuringAttributes.createLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
Attributes
name(java.lang.String name)
Specifies the name of the operation.Attributes
none()
scala.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 akka.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyCompleteState()
-
cancellationStrategyFailStage
public akka.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyFailStage()
Strategy that treatscancelStage
the same asfailStage
, i.e. all inlets are cancelled (propagating the cancellation cause) and all outlets are failed with an SiblingDownstreamWasCancelled exception.- Returns:
- (undocumented)
-
cancellationStrategyAfterDelay
public akka.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyAfterDelay(scala.concurrent.duration.FiniteDuration delay, akka.stream.Attributes.CancellationStrategy.Strategy strategy)
Strategy that allows to delay any action whencancelStage
is 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.
- Parameters:
delay
- (undocumented)strategy
- (undocumented)- Returns:
- (undocumented)
-
logLevelOff
public Logging.LogLevel logLevelOff()
-
logLevelError
public Logging.LogLevel logLevelError()
Use to enable logging at ERROR level for certain operations when configuringAttributes.createLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
-
logLevelWarning
public Logging.LogLevel logLevelWarning()
Use to enable logging at WARNING level for certain operations when configuringAttributes.createLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
-
logLevelInfo
public Logging.LogLevel logLevelInfo()
Use to enable logging at INFO level for certain operations when configuringAttributes.createLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
-
logLevelDebug
public Logging.LogLevel logLevelDebug()
Use to enable logging at DEBUG level for certain operations when configuringAttributes.createLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
-
apply
public Attributes apply(Attributes.Attribute attribute)
INTERNAL API- Parameters:
attribute
- (undocumented)- Returns:
- (undocumented)
-
apply$default$1
public scala.collection.immutable.List<Attributes.Attribute> apply$default$1()
-
none
public Attributes none()
-
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.When using this method the name is encoded with URLEncoder with UTF-8 because the name is sometimes used as part of actor name. If that is not desired the name can be added in it's raw format using
.addAttributes(Attributes(Name(name)))
.- Parameters:
name
- (undocumented)- Returns:
- (undocumented)
-
inputBuffer
public Attributes inputBuffer(int initial, int max)
Specifies the initial and maximum size of the input buffer.- Parameters:
initial
- (undocumented)max
- (undocumented)- Returns:
- (undocumented)
-
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()
.- Parameters:
onElement
- (undocumented)onFinish
- (undocumented)onFailure
- (undocumented)- Returns:
- (undocumented)
-
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()
.- Parameters:
onElement
- (undocumented)- Returns:
- (undocumented)
-
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.createLogLevels
for Java API- Parameters:
onElement
- (undocumented)onFinish
- (undocumented)onFailure
- (undocumented)- Returns:
- (undocumented)
-
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(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.- Parameters:
builder
- (undocumented)default_
- (undocumented)- Returns:
- (undocumented)
-
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)
-
-