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 <code class="paramref">initialDelay</code> for each element,
increases by <code class="paramref">increaseStep</code> every time when <code class="paramref">needsIncrease</code> 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 |
| TimeSpan | initialDelay | initial delay for each of elements |
| TimeSpan | maxDelay | limits maximum delay |
Methods
| Edit this page View SourceNextDelay(T)
Returns delay for ongoing <code class="paramref">element</code>,
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