Class DelayFlow<T>
Flow stage for universal delay management, allows to manage delay through IDelayStrategy<T>.
Inheritance
GraphStage<FlowShape<T, T>>
Akka.Streams.Implementation.Fusing.SimpleLinearGraphStage<T>
DelayFlow<T>
Implements
Inherited Members
Namespace: Akka.Streams.Dsl
Assembly: Akka.Streams.dll
Syntax
public class DelayFlow<T> : SimpleLinearGraphStage<T>, IGraphStageWithMaterializedValue<FlowShape<T, T>, NotUsed>, IGraph<FlowShape<T, T>, NotUsed>, IGraph<FlowShape<T, T>>
Type Parameters
Name | Description |
---|---|
T | type of element |
Constructors
| Improve this Doc View SourceDelayFlow(Func<IDelayStrategy<T>>)
Flow stage that determines delay for each ongoing element invoking
TimeSpan DelayStrategy.NextDelay(T element)
.
Implementing IDelayStrategy<T> with your own gives you flexible ability to manage delay value depending on coming elements.
It is important notice that IDelayStrategy<T> can be stateful.
There are also some predefined strategies: FixedDelay<T> and LinearIncreasingDelay<T>
Declaration
public DelayFlow(Func<IDelayStrategy<T>> strategySupplier)
Parameters
Type | Name | Description |
---|---|---|
Func<IDelayStrategy<T>> | strategySupplier | creates new IDelayStrategy<T> object for each materialization |
DelayFlow(TimeSpan)
Flow stage with fixed delay for each element.
Declaration
public DelayFlow(TimeSpan fixedDelay)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | fixedDelay | value of the delay |
Methods
| Improve this Doc View SourceCreateLogic(Attributes)
Declaration
protected override GraphStageLogic CreateLogic(Attributes inheritedAttributes)
Parameters
Type | Name | Description |
---|---|---|
Attributes | inheritedAttributes |
Returns
Type | Description |
---|---|
GraphStageLogic |
Overrides
Akka.Streams.Stage.GraphStage<Akka.Streams.FlowShape<T, T>>.CreateLogic(Akka.Streams.Attributes)