| SubFlowOperationsBufferTOut, TMat, TClosed Method |
Adds a fixed size buffer in the flow that allows to store elements from a faster upstream until it becomes full.
Depending on the defined
OverflowStrategy it might drop elements or backpressure the upstream if
there is no space available
Emits when downstream stops backpressuring and there is a pending element in the buffer
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 SubFlow<TOut, TMat, TClosed> Buffer<TOut, TMat, TClosed>(
this SubFlow<TOut, TMat, TClosed> flow,
int size,
OverflowStrategy strategy
)
[<ExtensionAttribute>]
static member Buffer :
flow : SubFlow<'TOut, 'TMat, 'TClosed> *
size : int *
strategy : OverflowStrategy -> SubFlow<'TOut, 'TMat, 'TClosed>
Parameters
- flow
- Type: Akka.Streams.DslSubFlowTOut, TMat, TClosed
TBD - size
- Type: SystemInt32
The size of the buffer in element count - strategy
- Type: Akka.StreamsOverflowStrategy
Strategy that is used when incoming elements cannot fit inside the buffer
Type Parameters
- TOut
- TBD
- TMat
- TBD
- TClosed
- TBD
Return Value
Type:
SubFlowTOut,
TMat,
TClosedTBD
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
SubFlowTOut,
TMat,
TClosed. 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