Click or drag to resize
Akka.NETFlowOperationsSplitAfter Method
Overload List
  NameDescription
Public methodStatic memberSplitAfterTIn, TOut, TMat(FlowTIn, TOut, TMat, FuncTOut, Boolean)
This operation applies the given predicate to all incoming elements and emits them to a stream of output streams. It *ends* the current substream when the predicate is true.
Public methodStatic memberSplitAfterTIn, TOut, TMat(FlowTIn, TOut, TMat, SubstreamCancelStrategy, FuncTOut, Boolean)
This operation applies the given predicate to all incoming elements and emits them to a stream of output streams.It * ends * the current substream when the predicate is true. This means that for the following series of predicate values, three substreams will be produced with lengths 2, 2, and 3: {{{ false, true, // elements go into first substream false, true, // elements go into second substream false, false, true // elements go into third substream }}} The object returned from this method is not a normal [[Source]] or[[Flow]], it is a SubFlowTOut, TMat, TClosed. This means that after this combinator all transformations are applied to all encountered substreams in the same fashion.Substream mode is exited either by closing the substream(i.e.connecting it to a [[Sink]]) or by merging the substreams back together; see the ToTMat2(IGraphSinkShapeTOut, TMat2) and MergeSubstreams methods on SubFlowTOut, TMat, TClosed for more information. It is important to note that the substreams also propagate back-pressure as any other stream, which means that blocking one substream will block the SplitAfterTIn, TOut, TMat(FlowTIn, TOut, TMat, SubstreamCancelStrategy, FuncTOut, Boolean) operator itself—and thereby all substreams—once all internal or explicit buffers are filled. If the split predicate throws an exception and the supervision decision is Stop the stream and substreams will be completed with failure. If the split predicate throws an exception and the supervision decision is Resume or Restart the element is dropped and the stream and substreams continue.

Emits when an element passes through.When the provided predicate is true it emits the element and opens a new substream for subsequent element

Backpressures when there is an element pending for the next substream, but the previous is not fully consumed yet, or the substream backpressures

Completes when upstream completes

Cancels when downstream cancels and substreams cancel
Top
See Also