Attributes

org.apache.pekko.stream.Attributes
See theAttributes companion object
final case class Attributes(attributeList: List[Attribute])

Holds attributes which can be used to alter pekko.stream.scaladsl.Flow / pekko.stream.javadsl.Flow or pekko.stream.scaladsl.GraphDSL / pekko.stream.javadsl.GraphDSL materialization.

Note that more attributes for the Materializer are defined in ActorAttributes.

The attributeList is 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 attributeList but instead use get to get the expected value of an attribute.

Attributes

Companion
object
Source
Attributes.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def and(other: Attributes): Attributes

Adds given attributes. Added attributes are considered more specific than already existing attributes of the same type.

Adds given attributes. Added attributes are considered more specific than already existing attributes of the same type.

Attributes

Source
Attributes.scala
def and(other: Attribute): Attributes

Adds given attribute. Added attribute is considered more specific than already existing attributes of the same type.

Adds given attribute. Added attribute is considered more specific than already existing attributes of the same type.

Attributes

Source
Attributes.scala
def contains(attr: Attribute): Boolean

Test whether the given attribute is contained within this attributes list.

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.

Attributes

Source
Attributes.scala
def filtered[T <: Attribute : ClassTag]: List[T]

Scala API: Get all attributes of a given type (or subtypes thereof).

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.

Attributes

Source
Attributes.scala
def get[T <: Attribute : ClassTag](default: T): T

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.

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.

Attributes

Source
Attributes.scala
def get[T <: Attribute : ClassTag]: Option[T]

Scala API: Get the most specific attribute value for a given Attribute type or subclass thereof.

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.

Attributes

See also

Attributes#get For providing a default value if the attribute was not set

Source
Attributes.scala
def getAttribute[T <: Attribute](c: Class[T], default: T): T

Java API: Get the most specific attribute value for a given Attribute type or subclass thereof. If no such attribute exists, return a default value.

Java API: Get the most specific attribute value for a given Attribute type or subclass thereof. 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.

Attributes

Source
Attributes.scala
def getAttribute[T <: Attribute](c: Class[T]): Optional[T]

Java API: Get the most specific attribute value for a given Attribute type or subclass thereof.

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.

Attributes

Source
Attributes.scala

Java API

Java API

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.

Attributes

Source
Attributes.scala
def getAttributeList[T <: Attribute](c: Class[T]): List[T]

Java API: Get all attributes of a given Class or subclass thereof.

Java API: Get all attributes of a given Class 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.

Attributes

Source
Attributes.scala
def getMandatoryAttribute[T <: MandatoryAttribute](c: Class[T]): T

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.

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.

Value parameters

c

A class that is a subtype of MandatoryAttribute

Attributes

Source
Attributes.scala

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.

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.

Attributes

Source
Attributes.scala

Extracts Name attributes and concatenates them.

Extracts Name attributes and concatenates them.

Attributes

Source
Attributes.scala

Attributes

Source
Attributes.scala

Deprecated methods

def getFirst[T <: Attribute : ClassTag](default: T): T

Scala API: Get the least specific attribute (added first) of a given type parameter T Class or subclass thereof. If no such attribute exists the default value is returned.

Scala API: Get the least specific attribute (added first) of a given type parameter T Class or subclass thereof. If no such attribute exists the default value is returned.

Attributes

Deprecated
true
Source
Attributes.scala
def getFirst[T <: Attribute : ClassTag]: Option[T]

Scala API: Get the least specific attribute (added first) of a given type parameter T Class or subclass thereof.

Scala API: Get the least specific attribute (added first) of a given type parameter T Class or subclass thereof.

Attributes

Deprecated
true
Source
Attributes.scala
def getFirstAttribute[T <: Attribute](c: Class[T], default: T): T

Java API: Get the least specific attribute (added first) of a given Class or subclass thereof. If no such attribute exists the default value is returned.

Java API: Get the least specific attribute (added first) of a given Class or subclass thereof. If no such attribute exists the default value is returned.

Attributes

Deprecated
true
Source
Attributes.scala
def getFirstAttribute[T <: Attribute](c: Class[T]): Optional[T]

Java API: Get the least specific attribute (added first) of a given Class or subclass thereof.

Java API: Get the least specific attribute (added first) of a given Class or subclass thereof.

Attributes

Deprecated
true
Source
Attributes.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product