Class Attributes
- java.lang.Object
-
- akka.stream.Attributes
-
- All Implemented Interfaces:
java.io.Serializable
,scala.Equals
,scala.Product
public final class Attributes extends java.lang.Object implements scala.Product, java.io.Serializable
Note that this must only be used during traversal building and not during materialization as it will then always return true because of the defaults from the ActorMaterializerSettings INTERNAL API- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Attributes.AsyncBoundary$
static interface
Attributes.Attribute
Note that more attributes for theMaterializer
are defined inActorAttributes
.static class
Attributes.CancellationStrategy
static class
Attributes.CancellationStrategy$
static class
Attributes.InputBuffer
static class
Attributes.InputBuffer$
static class
Attributes.LogLevels
static class
Attributes.LogLevels$
Use to disable logging on certain operations when configuringlogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
static interface
Attributes.MandatoryAttribute
static class
Attributes.Name
static class
Attributes.Name$
-
Constructor Summary
Constructors Constructor Description Attributes(scala.collection.immutable.List<Attributes.Attribute> attributeList)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static scala.collection.immutable.List<Attributes.Attribute>
$lessinit$greater$default$1()
Attributes
and(Attributes other)
Adds given attributes.Attributes
and(Attributes.Attribute other)
Adds given attribute.static Attributes
apply(Attributes.Attribute attribute)
INTERNAL APIstatic Attributes
apply(scala.collection.immutable.List<Attributes.Attribute> attributeList)
static scala.collection.immutable.List<Attributes.Attribute>
apply$default$1()
static Attributes
asyncBoundary()
scala.collection.immutable.List<Attributes.Attribute>
attributeList()
static akka.stream.Attributes.CancellationStrategy.Strategy
cancellationStrategyAfterDelay(scala.concurrent.duration.FiniteDuration delay, akka.stream.Attributes.CancellationStrategy.Strategy strategy)
Java APIstatic akka.stream.Attributes.CancellationStrategy.Strategy
cancellationStrategyCompleteState()
static akka.stream.Attributes.CancellationStrategy.Strategy
cancellationStrategyFailStage()
Java APIstatic akka.stream.Attributes.CancellationStrategy.Strategy
cancellationStrategyPropagateFailure()
Java APIboolean
canEqual(java.lang.Object x$1)
boolean
contains(Attributes.Attribute attr)
Test whether the given attribute is contained within this attributes list.Attributes
copy(scala.collection.immutable.List<Attributes.Attribute> attributeList)
scala.collection.immutable.List<Attributes.Attribute>
copy$default$1()
static Attributes
createLogLevels(Logging.LogLevel onElement)
Java APIstatic Attributes
createLogLevels(Logging.LogLevel onElement, Logging.LogLevel onFinish, Logging.LogLevel onFailure)
Java APIboolean
equals(java.lang.Object x$1)
static 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.<T extends Attributes.Attribute>
scala.collection.immutable.List<T>filtered(scala.reflect.ClassTag<T> evidence$4)
Scala API: Get all attributes of a given type (or subtypes thereof).<T extends Attributes.Attribute>
scala.Option<T>get(scala.reflect.ClassTag<T> evidence$2)
Scala API: Get the most specific attribute value for a given Attribute type or subclass thereof.<T extends Attributes.Attribute>
Tget(T default_, scala.reflect.ClassTag<T> evidence$1)
Scala API: Get the most specific attribute value for a given Attribute type or subclass thereof or if no such attribute exists, return a default value.<T extends Attributes.Attribute>
java.util.Optional<T>getAttribute(java.lang.Class<T> c)
Java API: Get the most specific attribute value for a given Attribute type or subclass thereof.<T extends Attributes.Attribute>
TgetAttribute(java.lang.Class<T> c, T default_)
Java API: Get the most specific attribute value for a given Attribute type or subclass thereof.java.util.List<Attributes.Attribute>
getAttributeList()
Java API<T extends Attributes.Attribute>
java.util.List<T>getAttributeList(java.lang.Class<T> c)
Java API: Get all attributes of a givenClass
or subclass thereof.<T extends Attributes.Attribute>
scala.Option<T>getFirst(scala.reflect.ClassTag<T> evidence$6)
Deprecated.Attributes should always be most specific, use get[T].<T extends Attributes.Attribute>
TgetFirst(T default_, scala.reflect.ClassTag<T> evidence$5)
Deprecated.Attributes should always be most specific, use get[T].<T extends Attributes.Attribute>
java.util.Optional<T>getFirstAttribute(java.lang.Class<T> c)
Deprecated.Attributes should always be most specific, use get[T].<T extends Attributes.Attribute>
TgetFirstAttribute(java.lang.Class<T> c, T default_)
Deprecated.Attributes should always be most specific, use getAttribute[T].<T extends Attributes.MandatoryAttribute>
TgetMandatoryAttribute(java.lang.Class<T> c)
Java API: Get the most specific of one of the mandatory attributes.int
hashCode()
static 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.boolean
isAsync()
static Logging.LogLevel
logLevelDebug()
Java API: Use to enable logging at DEBUG level for certain operations when configuringcreateLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
static Logging.LogLevel
logLevelError()
Java API: Use to enable logging at ERROR level for certain operations when configuringcreateLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
static Logging.LogLevel
logLevelInfo()
Java API: Use to enable logging at INFO level for certain operations when configuringcreateLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
static Logging.LogLevel
logLevelOff()
static Attributes
logLevels(Logging.LogLevel onElement, Logging.LogLevel onFinish, Logging.LogLevel onFailure)
Configureslog()
operator log-levels to be used when logging.static Logging.LogLevel
logLevels$default$1()
static Logging.LogLevel
logLevels$default$2()
static Logging.LogLevel
logLevels$default$3()
static Logging.LogLevel
logLevelWarning()
Java API: Use to enable logging at WARNING level for certain operations when configuringcreateLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
<T extends Attributes.MandatoryAttribute>
TmandatoryAttribute(scala.reflect.ClassTag<T> evidence$3)
Scala API: Get the most specific of one of the mandatory attributes.static Attributes
name(java.lang.String name)
Specifies the name of the operation.scala.Option<java.lang.String>
nameLifted()
Extracts Name attributes and concatenates them.java.lang.String
nameOrDefault(java.lang.String default_)
INTERNAL APIjava.lang.String
nameOrDefault$default$1()
static Attributes
none()
int
productArity()
java.lang.Object
productElement(int x$1)
java.lang.String
productElementName(int x$1)
scala.collection.Iterator<java.lang.Object>
productIterator()
java.lang.String
productPrefix()
java.lang.String
toString()
static scala.Option<scala.collection.immutable.List<Attributes.Attribute>>
unapply(Attributes x$0)
-
-
-
Constructor Detail
-
Attributes
public Attributes(scala.collection.immutable.List<Attributes.Attribute> attributeList)
-
-
Method Detail
-
$lessinit$greater$default$1
public static scala.collection.immutable.List<Attributes.Attribute> $lessinit$greater$default$1()
-
cancellationStrategyCompleteState
public static akka.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyCompleteState()
-
cancellationStrategyFailStage
public static akka.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyFailStage()
Java APIStrategy that treats
cancelStage
the same asfailStage
, i.e. all inlets are cancelled (propagating the cancellation cause) and all outlets are failed propagating the cause from cancellation.- Returns:
- (undocumented)
-
cancellationStrategyPropagateFailure
public static akka.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyPropagateFailure()
Java APIStrategy that treats
cancelStage
in 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.
- Returns:
- (undocumented)
-
cancellationStrategyAfterDelay
public static akka.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyAfterDelay(scala.concurrent.duration.FiniteDuration delay, akka.stream.Attributes.CancellationStrategy.Strategy strategy)
Java APIStrategy that allows to delay any action when
cancelStage
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 static Logging.LogLevel logLevelOff()
-
logLevelError
public static Logging.LogLevel logLevelError()
Java API: Use to enable logging at ERROR level for certain operations when configuringcreateLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
-
logLevelWarning
public static Logging.LogLevel logLevelWarning()
Java API: Use to enable logging at WARNING level for certain operations when configuringcreateLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
-
logLevelInfo
public static Logging.LogLevel logLevelInfo()
Java API: Use to enable logging at INFO level for certain operations when configuringcreateLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
-
logLevelDebug
public static Logging.LogLevel logLevelDebug()
Java API: Use to enable logging at DEBUG level for certain operations when configuringcreateLogLevels(akka.event.Logging.LogLevel, akka.event.Logging.LogLevel, akka.event.Logging.LogLevel)
-
apply
public static Attributes apply(Attributes.Attribute attribute)
INTERNAL API- Parameters:
attribute
- (undocumented)- Returns:
- (undocumented)
-
apply$default$1
public static scala.collection.immutable.List<Attributes.Attribute> apply$default$1()
-
none
public static Attributes none()
-
asyncBoundary
public static Attributes asyncBoundary()
-
name
public static 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 static 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.- Parameters:
initial
- (undocumented)max
- (undocumented)- Returns:
- (undocumented)
-
createLogLevels
public static 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 usinglogLevelOff()
.- Parameters:
onElement
- (undocumented)onFinish
- (undocumented)onFailure
- (undocumented)- Returns:
- (undocumented)
-
createLogLevels
public static 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 usinglogLevelOff()
.- Parameters:
onElement
- (undocumented)- Returns:
- (undocumented)
-
logLevels
public static 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 static Logging.LogLevel logLevels$default$1()
-
logLevels$default$2
public static Logging.LogLevel logLevels$default$2()
-
logLevels$default$3
public static Logging.LogLevel logLevels$default$3()
-
extractName
public static 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 static Attributes apply(scala.collection.immutable.List<Attributes.Attribute> attributeList)
-
unapply
public static scala.Option<scala.collection.immutable.List<Attributes.Attribute>> unapply(Attributes x$0)
-
attributeList
public scala.collection.immutable.List<Attributes.Attribute> attributeList()
-
isAsync
public boolean isAsync()
-
getAttribute
public <T extends Attributes.Attribute> T getAttribute(java.lang.Class<T> c, T default_)
Java API: Get the most specific attribute value for a given Attribute type or subclass thereof. If no such attribute exists, return adefault
value.The most specific value is the value that was added closest to the graph or operator itself or if the same attribute was added multiple times to the same graph, the last to be added.
This is the expected way for operators to access attributes.
- Parameters:
c
- (undocumented)default_
- (undocumented)- Returns:
- (undocumented)
-
getAttribute
public <T extends Attributes.Attribute> java.util.Optional<T> getAttribute(java.lang.Class<T> c)
Java API: Get the most specific attribute value for a given Attribute type or subclass thereof.The most specific value is the value that was added closest to the graph or operator itself or if the same attribute was added multiple times to the same graph, the last to be added.
This is the expected way for operators to access attributes.
- Parameters:
c
- (undocumented)- Returns:
- (undocumented)
-
get
public <T extends Attributes.Attribute> T get(T default_, scala.reflect.ClassTag<T> evidence$1)
Scala API: Get the most specific attribute value for a given Attribute type or subclass thereof or if no such attribute exists, return a default value.The most specific value is the value that was added closest to the graph or operator itself or if the same attribute was added multiple times to the same graph, the last to be added.
This is the expected way for operators to access attributes.
- Parameters:
default_
- (undocumented)evidence$1
- (undocumented)- Returns:
- (undocumented)
-
get
public <T extends Attributes.Attribute> scala.Option<T> get(scala.reflect.ClassTag<T> evidence$2)
Scala API: Get the most specific attribute value for a given Attribute type or subclass thereof.The most specific value is the value that was added closest to the graph or operator itself or if the same attribute was added multiple times to the same graph, the last to be added.
This is the expected way for operators to access attributes.
- Parameters:
evidence$2
- (undocumented)- Returns:
- (undocumented)
-
mandatoryAttribute
public <T extends Attributes.MandatoryAttribute> T mandatoryAttribute(scala.reflect.ClassTag<T> evidence$3)
Scala API: Get the most specific of one of the mandatory attributes. Mandatory attributes are guaranteed to always be among the attributes when the attributes are coming from a materialization.- Parameters:
evidence$3
- (undocumented)- Returns:
- (undocumented)
-
getMandatoryAttribute
public <T extends Attributes.MandatoryAttribute> T getMandatoryAttribute(java.lang.Class<T> c)
Java API: Get the most specific of one of the mandatory attributes. Mandatory attributes are guaranteed to always be among the attributes when the attributes are coming from a materialization.- Parameters:
c
- A class that is a subtype ofAttributes.MandatoryAttribute
- Returns:
- (undocumented)
-
and
public Attributes and(Attributes other)
Adds given attributes. Added attributes are considered more specific than already existing attributes of the same type.- Parameters:
other
- (undocumented)- Returns:
- (undocumented)
-
and
public Attributes and(Attributes.Attribute other)
Adds given attribute. Added attribute is considered more specific than already existing attributes of the same type.- Parameters:
other
- (undocumented)- Returns:
- (undocumented)
-
nameLifted
public scala.Option<java.lang.String> nameLifted()
Extracts Name attributes and concatenates them.- Returns:
- (undocumented)
-
nameOrDefault
public java.lang.String nameOrDefault(java.lang.String default_)
INTERNAL API- Parameters:
default_
- (undocumented)- Returns:
- (undocumented)
-
nameOrDefault$default$1
public java.lang.String nameOrDefault$default$1()
-
contains
public boolean contains(Attributes.Attribute attr)
Test whether the given attribute is contained within this attributes list.Note that operators in general should not inspect the whole hierarchy but instead use
get
to get the most specific attribute value.- Parameters:
attr
- (undocumented)- Returns:
- (undocumented)
-
getAttributeList
public java.util.List<Attributes.Attribute> getAttributeList()
Java APIThe list is ordered with the most specific attribute first, least specific last. Note that the order was the opposite in Akka 2.4.x.
Note that operators in general should not inspect the whole hierarchy but instead use
get
to get the most specific attribute value.- Returns:
- (undocumented)
-
getAttributeList
public <T extends Attributes.Attribute> java.util.List<T> getAttributeList(java.lang.Class<T> c)
Java API: Get all attributes of a givenClass
or subclass thereof.The list is ordered with the most specific attribute first, least specific last. Note that the order was the opposite in Akka 2.4.x.
Note that operators in general should not inspect the whole hierarchy but instead use
get
to get the most specific attribute value.- Parameters:
c
- (undocumented)- Returns:
- (undocumented)
-
filtered
public <T extends Attributes.Attribute> scala.collection.immutable.List<T> filtered(scala.reflect.ClassTag<T> evidence$4)
Scala API: Get all attributes of a given type (or subtypes thereof).Note that operators in general should not inspect the whole hierarchy but instead use
get
to get the most specific attribute value.The list is ordered with the most specific attribute first, least specific last. Note that the order was the opposite in Akka 2.4.x.
- Parameters:
evidence$4
- (undocumented)- Returns:
- (undocumented)
-
getFirstAttribute
public <T extends Attributes.Attribute> T getFirstAttribute(java.lang.Class<T> c, T default_)
Deprecated.Attributes should always be most specific, use getAttribute[T]. Since 2.5.7.Java API: Get the least specific attribute (added first) of a givenClass
or subclass thereof. If no such attribute exists thedefault
value is returned.- Parameters:
c
- (undocumented)default_
- (undocumented)- Returns:
- (undocumented)
-
getFirstAttribute
public <T extends Attributes.Attribute> java.util.Optional<T> getFirstAttribute(java.lang.Class<T> c)
Deprecated.Attributes should always be most specific, use get[T]. Since 2.5.7.Java API: Get the least specific attribute (added first) of a givenClass
or subclass thereof.- Parameters:
c
- (undocumented)- Returns:
- (undocumented)
-
getFirst
public <T extends Attributes.Attribute> T getFirst(T default_, scala.reflect.ClassTag<T> evidence$5)
Deprecated.Attributes should always be most specific, use get[T]. Since 2.5.7.Scala API: Get the least specific attribute (added first) of a given type parameter TClass
or subclass thereof. If no such attribute exists thedefault
value is returned.- Parameters:
default_
- (undocumented)evidence$5
- (undocumented)- Returns:
- (undocumented)
-
getFirst
public <T extends Attributes.Attribute> scala.Option<T> getFirst(scala.reflect.ClassTag<T> evidence$6)
Deprecated.Attributes should always be most specific, use get[T]. Since 2.5.7.Scala API: Get the least specific attribute (added first) of a given type parameter TClass
or subclass thereof.- Parameters:
evidence$6
- (undocumented)- Returns:
- (undocumented)
-
copy
public Attributes copy(scala.collection.immutable.List<Attributes.Attribute> attributeList)
-
copy$default$1
public scala.collection.immutable.List<Attributes.Attribute> copy$default$1()
-
productPrefix
public java.lang.String productPrefix()
- Specified by:
productPrefix
in interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArity
in interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElement
in interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIterator
in interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqual
in interfacescala.Equals
-
productElementName
public java.lang.String productElementName(int x$1)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
equals
in interfacescala.Equals
- Overrides:
equals
in classjava.lang.Object
-
-