Class Attributes
- java.lang.Object
- 
- org.apache.pekko.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.SerializableHolds attributes which can be used to alterpekko.stream.scaladsl.Flow/pekko.stream.javadsl.Floworpekko.stream.scaladsl.GraphDSL/pekko.stream.javadsl.GraphDSLmaterialization.Note that more attributes for the Materializerare defined inActorAttributes.The attributeListis ordered with the most specific attribute first, least specific last. Note that the order was the opposite in Akka 2.4.x.Operators should in general not access the attributeListbut instead usegetto get the expected value of an attribute.- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classAttributes.AsyncBoundary$static interfaceAttributes.AttributeNote that more attributes for theMaterializerare defined inActorAttributes.static classAttributes.CancellationStrategyCancellation strategies provide a way to configure the behavior of a stage whencancelStageis called.static classAttributes.CancellationStrategy$static classAttributes.InputBufferEach asynchronous piece of a materialized stream topology is executed by one Actor that manages an input buffer for all inlets of its shape.static classAttributes.InputBuffer$static classAttributes.LogLevelsstatic classAttributes.LogLevels$static interfaceAttributes.MandatoryAttributeAttributes that are always present (is defined with default values by the materializer)static classAttributes.Namestatic classAttributes.Name$static classAttributes.NestedMaterializationCancellationPolicyNested materialization cancellation strategy provides a way to configure the cancellation behavior of stages that materialize a nested flow.static classAttributes.NestedMaterializationCancellationPolicy$static classAttributes.SourceLocationAttribute that contains the source location of for example a lambda passed to an operator, useful for example for debugging.static classAttributes.SourceLocation$
 - 
Constructor SummaryConstructors Constructor Description Attributes(scala.collection.immutable.List<Attributes.Attribute> attributeList)
 - 
Method SummaryAll 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()Attributesand(Attributes other)Adds given attributes.Attributesand(Attributes.Attribute other)Adds given attribute.static Attributesapply(Attributes.Attribute attribute)INTERNAL APIstatic Attributesapply(scala.collection.immutable.List<Attributes.Attribute> attributeList)static scala.collection.immutable.List<Attributes.Attribute>apply$default$1()static AttributesasyncBoundary()scala.collection.immutable.List<Attributes.Attribute>attributeList()static org.apache.pekko.stream.Attributes.CancellationStrategy.StrategycancellationStrategyAfterDelay(scala.concurrent.duration.FiniteDuration delay, org.apache.pekko.stream.Attributes.CancellationStrategy.Strategy strategy)Java APIstatic org.apache.pekko.stream.Attributes.CancellationStrategy.StrategycancellationStrategyCompleteState()Java APIstatic org.apache.pekko.stream.Attributes.CancellationStrategy.StrategycancellationStrategyFailStage()Java APIstatic org.apache.pekko.stream.Attributes.CancellationStrategy.StrategycancellationStrategyPropagateFailure()Java APIbooleancanEqual(java.lang.Object x$1)booleancontains(Attributes.Attribute attr)Test whether the given attribute is contained within this attributes list.Attributescopy(scala.collection.immutable.List<Attributes.Attribute> attributeList)scala.collection.immutable.List<Attributes.Attribute>copy$default$1()static AttributescreateLogLevels(Logging.LogLevel onElement)Java APIstatic AttributescreateLogLevels(Logging.LogLevel onElement, Logging.LogLevel onFinish, Logging.LogLevel onFailure)Java APIbooleanequals(java.lang.Object x$1)static java.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.<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 givenClassor 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.inthashCode()static 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.static Logging.LogLevellogLevelDebug()Java API: Use to enable logging at DEBUG level for certain operations when configuringcreateLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)static Logging.LogLevellogLevelError()Java API: Use to enable logging at ERROR level for certain operations when configuringcreateLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)static Logging.LogLevellogLevelInfo()Java API: Use to enable logging at INFO level for certain operations when configuringcreateLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)static Logging.LogLevellogLevelOff()Java API: Use to disable logging on certain operations when configuringcreateLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)static AttributeslogLevels(Logging.LogLevel onElement, Logging.LogLevel onFinish, Logging.LogLevel onFailure)Configureslog()operator log-levels to be used when logging.static Logging.LogLevellogLevels$default$1()static Logging.LogLevellogLevels$default$2()static Logging.LogLevellogLevels$default$3()static Logging.LogLevellogLevelWarning()Java API: Use to enable logging at WARNING level for certain operations when configuringcreateLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.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 Attributesname(java.lang.String name)Specifies the name of the operation.scala.Option<java.lang.String>nameLifted()Extracts Name attributes and concatenates them.java.lang.StringnameOrDefault(java.lang.String default_)java.lang.StringnameOrDefault$default$1()static Attributes.NestedMaterializationCancellationPolicynestedMaterializationCancellationPolicyDefault()DefaultAttributes.NestedMaterializationCancellationPolicy, please seepekko.stream.Attributes#nestedMaterializationCancellationPolicyEagerCancellation()for details.static Attributes.NestedMaterializationCancellationPolicynestedMaterializationCancellationPolicyEagerCancellation()JAVA API AAttributes.NestedMaterializationCancellationPolicythat configures graph stages delaying nested flow materialization to cancel immediately when downstream cancels before nested flow materialization.static Attributes.NestedMaterializationCancellationPolicynestedMaterializationCancellationPolicyPropagateToNested()JAVA API AAttributes.NestedMaterializationCancellationPolicythat configures graph stages delaying nested flow materialization to delay cancellation when downstream cancels before nested flow materialization.static Attributesnone()INTERNAL APIintproductArity()java.lang.ObjectproductElement(int x$1)java.lang.StringproductElementName(int x$1)scala.collection.Iterator<java.lang.Object>productIterator()java.lang.StringproductPrefix()java.lang.StringtoString()static scala.Option<scala.collection.immutable.List<Attributes.Attribute>>unapply(Attributes x$0)
 
- 
- 
- 
Constructor Detail- 
Attributespublic Attributes(scala.collection.immutable.List<Attributes.Attribute> attributeList) 
 
- 
 - 
Method Detail- 
$lessinit$greater$default$1public static scala.collection.immutable.List<Attributes.Attribute> $lessinit$greater$default$1() 
 - 
cancellationStrategyCompleteStatepublic static 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). 
 - 
cancellationStrategyFailStagepublic static 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.
 - 
cancellationStrategyPropagateFailurepublic static 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. 
 - 
cancellationStrategyAfterDelaypublic static 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. 
 - 
nestedMaterializationCancellationPolicyEagerCancellationpublic static Attributes.NestedMaterializationCancellationPolicy nestedMaterializationCancellationPolicyEagerCancellation() JAVA API AAttributes.NestedMaterializationCancellationPolicythat 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.
 - 
nestedMaterializationCancellationPolicyPropagateToNestedpublic static Attributes.NestedMaterializationCancellationPolicy nestedMaterializationCancellationPolicyPropagateToNested() JAVA API AAttributes.NestedMaterializationCancellationPolicythat 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.
 - 
nestedMaterializationCancellationPolicyDefaultpublic static Attributes.NestedMaterializationCancellationPolicy nestedMaterializationCancellationPolicyDefault() DefaultAttributes.NestedMaterializationCancellationPolicy, please seepekko.stream.Attributes#nestedMaterializationCancellationPolicyEagerCancellation()for details.
 - 
logLevelOffpublic static Logging.LogLevel logLevelOff() Java API: Use to disable logging on certain operations when configuringcreateLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)
 - 
logLevelErrorpublic static Logging.LogLevel logLevelError() Java API: Use to enable logging at ERROR level for certain operations when configuringcreateLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)
 - 
logLevelWarningpublic static Logging.LogLevel logLevelWarning() Java API: Use to enable logging at WARNING level for certain operations when configuringcreateLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)
 - 
logLevelInfopublic static Logging.LogLevel logLevelInfo() Java API: Use to enable logging at INFO level for certain operations when configuringcreateLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)
 - 
logLevelDebugpublic static Logging.LogLevel logLevelDebug() Java API: Use to enable logging at DEBUG level for certain operations when configuringcreateLogLevels(org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel, org.apache.pekko.event.Logging.LogLevel)
 - 
applypublic static Attributes apply(Attributes.Attribute attribute) INTERNAL API
 - 
apply$default$1public static scala.collection.immutable.List<Attributes.Attribute> apply$default$1() 
 - 
nonepublic static Attributes none() INTERNAL API
 - 
asyncBoundarypublic static Attributes asyncBoundary() 
 - 
namepublic 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.
 - 
inputBufferpublic 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.
 - 
createLogLevelspublic 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().
 - 
createLogLevelspublic 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().
 - 
logLevelspublic 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.createLogLevelsfor Java API
 - 
logLevels$default$1public static Logging.LogLevel logLevels$default$1() 
 - 
logLevels$default$2public static Logging.LogLevel logLevels$default$2() 
 - 
logLevels$default$3public static Logging.LogLevel logLevels$default$3() 
 - 
extractNamepublic static 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.
 - 
applypublic static Attributes apply(scala.collection.immutable.List<Attributes.Attribute> attributeList) 
 - 
unapplypublic static scala.Option<scala.collection.immutable.List<Attributes.Attribute>> unapply(Attributes x$0) 
 - 
attributeListpublic scala.collection.immutable.List<Attributes.Attribute> attributeList() 
 - 
getAttributepublic <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 adefaultvalue.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. 
 - 
getAttributepublic <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. 
 - 
getpublic <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. 
 - 
getpublic <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. 
 - 
mandatoryAttributepublic <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.
 - 
getMandatoryAttributepublic <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 of- Attributes.MandatoryAttribute
 
 - 
andpublic Attributes and(Attributes other) Adds given attributes. Added attributes are considered more specific than already existing attributes of the same type.
 - 
andpublic Attributes and(Attributes.Attribute other) Adds given attribute. Added attribute is considered more specific than already existing attributes of the same type.
 - 
nameLiftedpublic scala.Option<java.lang.String> nameLifted() Extracts Name attributes and concatenates them.
 - 
nameOrDefaultpublic java.lang.String nameOrDefault(java.lang.String default_) 
 - 
nameOrDefault$default$1public java.lang.String nameOrDefault$default$1() 
 - 
containspublic 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 getto get the most specific attribute value.
 - 
getAttributeListpublic 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 getto get the most specific attribute value.
 - 
getAttributeListpublic <T extends Attributes.Attribute> java.util.List<T> getAttributeList(java.lang.Class<T> c) Java API: Get all attributes of a givenClassor 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 getto get the most specific attribute value.
 - 
filteredpublic <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 getto 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. 
 - 
getFirstAttributepublic <T extends Attributes.Attribute> T getFirstAttribute(java.lang.Class<T> c, T default_) Deprecated.Attributes should always be most specific, use getAttribute[T]. Since Akka 2.5.7.Java API: Get the least specific attribute (added first) of a givenClassor subclass thereof. If no such attribute exists thedefaultvalue is returned.
 - 
getFirstAttributepublic <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 Akka 2.5.7.Java API: Get the least specific attribute (added first) of a givenClassor subclass thereof.
 - 
getFirstpublic <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 Akka 2.5.7.Scala API: Get the least specific attribute (added first) of a given type parameter TClassor subclass thereof. If no such attribute exists thedefaultvalue is returned.
 - 
getFirstpublic <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 Akka 2.5.7.Scala API: Get the least specific attribute (added first) of a given type parameter TClassor subclass thereof.
 - 
copypublic Attributes copy(scala.collection.immutable.List<Attributes.Attribute> attributeList) 
 - 
copy$default$1public scala.collection.immutable.List<Attributes.Attribute> copy$default$1() 
 - 
productPrefixpublic java.lang.String productPrefix() - Specified by:
- productPrefixin interface- scala.Product
 
 - 
productAritypublic int productArity() - Specified by:
- productArityin interface- scala.Product
 
 - 
productElementpublic java.lang.Object productElement(int x$1) - Specified by:
- productElementin interface- scala.Product
 
 - 
productIteratorpublic scala.collection.Iterator<java.lang.Object> productIterator() - Specified by:
- productIteratorin interface- scala.Product
 
 - 
canEqualpublic boolean canEqual(java.lang.Object x$1) - Specified by:
- canEqualin interface- scala.Equals
 
 - 
productElementNamepublic java.lang.String productElementName(int x$1) - Specified by:
- productElementNamein interface- scala.Product
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object x$1) - Specified by:
- equalsin interface- scala.Equals
- Overrides:
- equalsin class- java.lang.Object
 
 
- 
 
-