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
| Improve this Doc View SourceAttributes(Attributes.IAttribute[])
TBD
Declaration
public Attributes(params Attributes.IAttribute[] attributes)
Parameters
Type | Name | Description |
---|---|---|
Attributes.IAttribute[] | attributes | TBD |
Fields
| Improve this Doc View SourceNone
TBD
Declaration
public static readonly Attributes None
Field Value
Type | Description |
---|---|
Attributes |
Properties
| Improve this Doc 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
| Improve this Doc View SourceAnd(Attributes)
Adds given attributes to the end of these attributes.
Declaration
public Attributes And(Attributes other)
Parameters
Type | Name | Description |
---|---|---|
Attributes | other | TBD |
Returns
Type | Description |
---|---|
Attributes | TBD |
And(Attributes.IAttribute)
Adds given attribute to the end of these attributes.
Declaration
public Attributes And(Attributes.IAttribute other)
Parameters
Type | Name | Description |
---|---|---|
Attributes.IAttribute | other | TBD |
Returns
Type | Description |
---|---|
Attributes | TBD |
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
public bool Contains<TAttr>(TAttr attribute)
where TAttr : Attributes.IAttribute
Parameters
Type | Name | Description |
---|---|---|
TAttr | attribute | TBD |
Returns
Type | Description |
---|---|
Boolean | TBD |
Type Parameters
Name | Description |
---|---|
TAttr | TBD |
CreateAsyncBoundary()
TBD
Declaration
public static Attributes CreateAsyncBoundary()
Returns
Type | Description |
---|---|
Attributes | TBD |
CreateInputBuffer(Int32, Int32)
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 |
---|---|---|
Int32 | initial | TBD |
Int32 | 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) 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 | TBD |
Returns
Type | Description |
---|---|
Attributes | TBD |
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 |
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 | TBD |
Type Parameters
Name | Description |
---|---|
TAttr | TBD |
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 | TBD |
Returns
Type | Description |
---|---|
TAttr | TBD |
Type Parameters
Name | Description |
---|---|
TAttr | 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> | TBD |
Type Parameters
Name | Description |
---|---|
TAttr | TBD |
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 | TBD |
Type Parameters
Name | Description |
---|---|
TAttr | TBD |
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 | TBD |
Returns
Type | Description |
---|---|
TAttr | TBD |
Type Parameters
Name | Description |
---|---|
TAttr | TBD |
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 | TBD |
GetNameOrDefault(String)
TBD
Declaration
public string GetNameOrDefault(string defaultIfNotFound = "unknown-operation")
Parameters
Type | Name | Description |
---|---|---|
String | defaultIfNotFound | TBD |
Returns
Type | Description |
---|---|
String | TBD |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |