Class Attributes
Holds attributes which can be used to alter Flow<TIn, TOut, TMat> or GraphDsl materialization.
Note that more attributes for the ActorMaterializer are defined in ActorAttributes.
Inherited Members
Namespace: Akka.Streams
Assembly: Akka.Streams.dll
Syntax
public sealed class Attributes
Constructors
| Edit this page View SourceAttributes(params IAttribute[])
Declaration
public Attributes(params Attributes.IAttribute[] attributes)
Parameters
| Type | Name | Description |
|---|---|---|
| IAttribute[] | attributes |
Fields
| Edit this page View SourceNone
Declaration
public static readonly Attributes None
Field Value
| Type | Description |
|---|---|
| Attributes |
Properties
| Edit this page View SourceAttributeList
The list is ordered with the most specific attribute first, least specific last.
Note that operators in general should not inspect the whole hierarchy but instead use GetAttribute<TAttr>(TAttr?) to get the most specific attribute value.
Declaration
public IEnumerable<Attributes.IAttribute> AttributeList { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<Attributes.IAttribute> |
Methods
| Edit this page View SourceAnd(Attributes)
Adds given attributes to the end of these attributes.
Declaration
public Attributes And(Attributes other)
Parameters
| Type | Name | Description |
|---|---|---|
| Attributes | other |
Returns
| Type | Description |
|---|---|
| Attributes |
And(IAttribute)
Adds given attribute to the end of these attributes.
Declaration
public Attributes And(Attributes.IAttribute other)
Parameters
| Type | Name | Description |
|---|---|---|
| Attributes.IAttribute | other |
Returns
| Type | Description |
|---|---|
| Attributes |
Contains<TAttr>()
Test whether the given attribute Type is contained within this attribute list.
Note that operators in general should not inspect the whole hierarchy but instead use
get to get the most specific attribute value.
Declaration
public bool Contains<TAttr>() where TAttr : Attributes.IAttribute
Returns
| Type | Description |
|---|---|
| bool |
Type Parameters
| Name | Description |
|---|---|
| TAttr |
Contains<TAttr>(TAttr)
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.
Declaration
[Obsolete("Use Contains<TAttr>() instead")]
public bool Contains<TAttr>(TAttr attribute) where TAttr : Attributes.IAttribute
Parameters
| Type | Name | Description |
|---|---|---|
| TAttr | attribute |
Returns
| Type | Description |
|---|---|
| bool |
Type Parameters
| Name | Description |
|---|---|
| TAttr |
CreateAsyncBoundary()
TBD
Declaration
public static Attributes CreateAsyncBoundary()
Returns
| Type | Description |
|---|---|
| Attributes | TBD |
CreateInputBuffer(int, int)
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.
Declaration
public static Attributes CreateInputBuffer(int initial, int max)
Parameters
| Type | Name | Description |
|---|---|---|
| int | initial | TBD |
| int | max | TBD |
Returns
| Type | Description |
|---|---|
| Attributes | TBD |
CreateLogLevels(LogLevel, LogLevel, LogLevel)
Configures Log<TIn, TOut, TMat>(Flow<TIn, TOut, TMat>, string, Func<TOut, object>, ILoggingAdapter, LogLevel) stage log-levels to be used when logging. Logging a certain operation can be completely disabled by using Off
Passing in null as any of the arguments sets the level to its default value, which is:
DebugLevel for onElement and onFinish, and ErrorLevel for onError.
Declaration
public static Attributes CreateLogLevels(LogLevel onElement = LogLevel.DebugLevel, LogLevel onFinish = LogLevel.DebugLevel, LogLevel onError = LogLevel.ErrorLevel)
Parameters
| Type | Name | Description |
|---|---|---|
| LogLevel | onElement | TBD |
| LogLevel | onFinish | TBD |
| LogLevel | onError | TBD |
Returns
| Type | Description |
|---|---|
| Attributes | TBD |
CreateName(string)
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 Uri.EscapeUriString 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 .And(new Attributes(new Name(name))).
Declaration
public static Attributes CreateName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name |
Returns
| Type | Description |
|---|---|
| Attributes |
ExtractName(IModule, string)
Compute a name by concatenating all Name attributes that the given module has, returning the given default value if none are found.
Declaration
public static string ExtractName(IModule module, string defaultIfNotFound)
Parameters
| Type | Name | Description |
|---|---|---|
| IModule | module | TBD |
| string | defaultIfNotFound | TBD |
Returns
| Type | Description |
|---|---|
| string | TBD |
GetAttributeList<TAttr>()
Get all attributes of a given type (or subtypes thereof).
Note that operators in general should not inspect the whole hierarchy but instead use GetAttribute<TAttr>(TAttr?) to get the most specific attribute value.
The list is ordered with the most specific attribute first, least specific last.
Declaration
public IEnumerable<TAttr> GetAttributeList<TAttr>() where TAttr : Attributes.IAttribute
Returns
| Type | Description |
|---|---|
| IEnumerable<TAttr> |
Type Parameters
| Name | Description |
|---|---|
| TAttr |
GetAttribute<TAttr>()
Get the last (most specific) attribute of a given type or subtype thereof.
Declaration
public TAttr GetAttribute<TAttr>() where TAttr : class, Attributes.IAttribute
Returns
| Type | Description |
|---|---|
| TAttr |
Type Parameters
| Name | Description |
|---|---|
| TAttr |
GetAttribute<TAttr>(TAttr?)
Get the last (most specific) attribute of a given type or subtype thereof. If no such attribute exists the default value is returned.
Declaration
public TAttr? GetAttribute<TAttr>(TAttr? defaultIfNotFound) where TAttr : class, Attributes.IAttribute
Parameters
| Type | Name | Description |
|---|---|---|
| TAttr | defaultIfNotFound |
Returns
| Type | Description |
|---|---|
| TAttr |
Type Parameters
| Name | Description |
|---|---|
| TAttr |
GetFirstAttribute<TAttr>()
Get the first (least specific) attribute of a given type or subtype thereof.
Declaration
[Obsolete("Attributes should always be most specific, use GetAttribute<TAttr>()")]
public TAttr GetFirstAttribute<TAttr>() where TAttr : class, Attributes.IAttribute
Returns
| Type | Description |
|---|---|
| TAttr |
Type Parameters
| Name | Description |
|---|---|
| TAttr |
GetFirstAttribute<TAttr>(TAttr)
Get the first (least specific) attribute of a given type or subtype thereof. If no such attribute exists the default value is returned.
Declaration
[Obsolete("Attributes should always be most specific, use GetAttribute<TAttr>()")]
public TAttr GetFirstAttribute<TAttr>(TAttr defaultIfNotFound) where TAttr : class, Attributes.IAttribute
Parameters
| Type | Name | Description |
|---|---|---|
| TAttr | defaultIfNotFound |
Returns
| Type | Description |
|---|---|
| TAttr |
Type Parameters
| Name | Description |
|---|---|
| TAttr |
GetMandatoryAttribute<TAttr>()
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.
Declaration
public TAttr GetMandatoryAttribute<TAttr>() where TAttr : class, Attributes.IMandatoryAttribute
Returns
| Type | Description |
|---|---|
| TAttr |
Type Parameters
| Name | Description |
|---|---|
| TAttr |
GetNameLifted()
Extracts Name attributes and concatenates them.
Declaration
public string GetNameLifted()
Returns
| Type | Description |
|---|---|
| string |
GetNameOrDefault(string)
Declaration
public string GetNameOrDefault(string defaultIfNotFound = "unknown-operation")
Parameters
| Type | Name | Description |
|---|---|---|
| string | defaultIfNotFound |
Returns
| Type | Description |
|---|---|
| string |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the current object. |
Edit this page