| FlowOperationsDelayTIn, TOut, TMat Method |
Shifts elements emission in time by a specified amount. It allows to store elements
in internal buffer while waiting for next element to be emitted. Depending on the defined
DelayOverflowStrategy it might drop elements or backpressure the upstream if
there is no space available in the buffer.
Delay precision is 10ms to avoid unnecessary timer scheduling cycles
Internal buffer has default capacity 16. You can set buffer size by calling
CreateInputBuffer(Int32, Int32)
Emits when there is a pending element in the buffer and configured time for this element elapsed
* EmitEarly - strategy do not wait to emit element if buffer is full
Backpressures when depending on OverflowStrategy
* Backpressure - backpressures when buffer is full
* DropHead, DropTail, DropBuffer - never backpressures
* Fail - fails the stream if buffer gets full
Completes when upstream completes and buffered elements has been drained
Cancels when downstream cancels
Namespace:
Akka.Streams.Dsl
Assembly:
Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax public static Flow<TIn, TOut, TMat> Delay<TIn, TOut, TMat>(
this Flow<TIn, TOut, TMat> flow,
TimeSpan of,
Nullable<DelayOverflowStrategy> strategy = null
)
[<ExtensionAttribute>]
static member Delay :
flow : Flow<'TIn, 'TOut, 'TMat> *
of : TimeSpan *
?strategy : Nullable<DelayOverflowStrategy>
(* Defaults:
let _strategy = defaultArg strategy null
*)
-> Flow<'TIn, 'TOut, 'TMat>
Parameters
- flow
- Type: Akka.Streams.DslFlowTIn, TOut, TMat
TBD - of
- Type: SystemTimeSpan
Time to shift all messages. - strategy (Optional)
- Type: SystemNullableDelayOverflowStrategy
Strategy that is used when incoming elements cannot fit inside the buffer
Type Parameters
- TIn
- TBD
- TOut
- TBD
- TMat
- TBD
Return Value
Type:
FlowTIn,
TOut,
TMatTBD
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
FlowTIn,
TOut,
TMat. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also