Class Attributes
Assembly: Akka.Streams.dll
Syntax
public sealed class Attributes
Constructors
|
Improve this Doc
View Source
Attributes(Attributes.IAttribute[])
Declaration
public Attributes(params Attributes.IAttribute[] attributes)
Parameters
Fields
|
Improve this Doc
View Source
None
Declaration
public static readonly Attributes None
Field Value
Properties
|
Improve this Doc
View Source
AttributeList
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
Methods
|
Improve this Doc
View Source
And(Attributes)
Adds given attributes to the end of these attributes.
Declaration
public Attributes And(Attributes other)
Parameters
Returns
|
Improve this Doc
View Source
And(Attributes.IAttribute)
Adds given attribute to the end of these attributes.
Declaration
public Attributes And(Attributes.IAttribute other)
Parameters
Returns
|
Improve this Doc
View Source
Contains<TAttr>()
Declaration
public bool Contains<TAttr>()
where TAttr : Attributes.IAttribute
Returns
Type Parameters
|
Improve this Doc
View Source
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 GetAttribute<TAttr>() instead")]
public bool Contains<TAttr>(TAttr attribute)
where TAttr : Attributes.IAttribute
Parameters
Type |
Name |
Description |
TAttr |
attribute |
|
Returns
Type Parameters
|
Improve this Doc
View Source
CreateAsyncBoundary()
Declaration
public static Attributes CreateAsyncBoundary()
Returns
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
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
Returns
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
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 Parameters
|
Improve this Doc
View Source
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 Parameters
|
Improve this Doc
View Source
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 Parameters
|
Improve this Doc
View Source
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 Parameters
|
Improve this Doc
View Source
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 Parameters
|
Improve this Doc
View Source
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 Parameters
|
Improve this Doc
View Source
GetNameLifted()
Extracts Name attributes and concatenates them.
Declaration
public string GetNameLifted()
Returns
|
Improve this Doc
View Source
GetNameOrDefault(String)
Declaration
public string GetNameOrDefault(string defaultIfNotFound = "unknown-operation")
Parameters
Type |
Name |
Description |
String |
defaultIfNotFound |
|
Returns
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Extension Methods