Class Valve<T>
Materializes into a task of IValveSwitch which provides a method that will stop or restart the flow of elements passing through the stage. As long as the valve is closed it will backpressure. Note that closing the valve could result in one element being buffered inside the stage, and if the stream completes or fails while being closed, that element may be lost.
Implements
Inherited Members
Namespace: Akka.Streams.Dsl
Assembly: Akka.Streams.dll
Syntax
public class Valve<T> : GraphStageWithMaterializedValue<FlowShape<T, T>, Task<IValveSwitch>>, IGraphStageWithMaterializedValue<FlowShape<T, T>, Task<IValveSwitch>>, IGraph<FlowShape<T, T>, Task<IValveSwitch>>, IGraph<FlowShape<T, T>>
Type Parameters
Name | Description |
---|---|
T | type of element |
Constructors
| Improve this Doc View SourceValve()
Creates already open Valve<T>
Declaration
public Valve()
Valve(SwitchMode)
Creates Valve<T> with inital mode
Declaration
public Valve(SwitchMode mode)
Parameters
Type | Name | Description |
---|---|---|
SwitchMode | mode | state of the valve at the startup of the flow |
Properties
| Improve this Doc View SourceIn
Declaration
public Inlet<T> In { get; }
Property Value
Type | Description |
---|---|
Inlet<T> |
Out
Declaration
public Outlet<T> Out { get; }
Property Value
Type | Description |
---|---|
Outlet<T> |
Shape
Declaration
public override FlowShape<T, T> Shape { get; }
Property Value
Type | Description |
---|---|
FlowShape<T, T> |
Overrides
Akka.Streams.Stage.GraphStageWithMaterializedValue<Akka.Streams.FlowShape<T, T>, System.Threading.Tasks.Task<Akka.Streams.Dsl.IValveSwitch>>.Shape
Methods
| Improve this Doc View SourceCreateLogicAndMaterializedValue(Attributes)
Declaration
public override ILogicAndMaterializedValue<Task<IValveSwitch>> CreateLogicAndMaterializedValue(Attributes inheritedAttributes)
Parameters
Type | Name | Description |
---|---|---|
Attributes | inheritedAttributes |
Returns
Type | Description |
---|---|
ILogicAndMaterializedValue<Task<IValveSwitch>> |
Overrides
Akka.Streams.Stage.GraphStageWithMaterializedValue<Akka.Streams.FlowShape<T, T>, System.Threading.Tasks.Task<Akka.Streams.Dsl.IValveSwitch>>.CreateLogicAndMaterializedValue(Akka.Streams.Attributes)