Class LinearIncreasingDelay<T>
Strategy with linear increasing delay.
Implements
Inherited Members
Namespace: Akka.Streams.Dsl
Assembly: Akka.Streams.dll
Syntax
public class LinearIncreasingDelay<T> : IDelayStrategy<T>
Type Parameters
| Name | Description |
|---|---|
| T | type of element |
Constructors
| Edit this page View SourceLinearIncreasingDelay(TimeSpan, Func<T, bool>, TimeSpan, TimeSpan)
Creates strategy that starts with initialDelay for each element,
increases by increaseStep every time when needsIncrease returns
true up to maxDelay,
when needsIncrease returns false it resets to initialDelay.
Declaration
public LinearIncreasingDelay(TimeSpan increaseStep, Func<T, bool> needsIncrease, TimeSpan initialDelay, TimeSpan maxDelay)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | increaseStep | step by which delay is increased |
| Func<T, bool> | needsIncrease | if delay increases, if delay resets to initialDelay
|
| TimeSpan | initialDelay | initial delay for each of elements |
| TimeSpan | maxDelay | limits maximum delay |
Methods
| Edit this page View SourceNextDelay(T)
Returns delay for ongoing element,
TimeSpan.Zero means passing without delay
Declaration
public TimeSpan NextDelay(T element)
Parameters
| Type | Name | Description |
|---|---|---|
| T | element | element |
Returns
| Type | Description |
|---|---|
| TimeSpan |
Edit this page