Class Flow
A Flow is a set of stream processing steps that has one open input and one open output.
Inherited Members
Namespace: Akka.Streams.Dsl
Assembly: Akka.Streams.dll
Syntax
public static class Flow
Methods
| Improve this Doc View SourceCreate<T>()
Helper to create a Flow<TIn, TOut, TMat> without a Source or Sink.
Declaration
public static Flow<T, T, NotUsed> Create<T>()
Returns
Type | Description |
---|---|
Flow<T, T, NotUsed> | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
Create<T, TMat>()
Helper to create a Flow<TIn, TOut, TMat> without a Source or Sink.
Declaration
public static Flow<T, T, TMat> Create<T, TMat>()
Returns
Type | Description |
---|---|
Flow<T, T, TMat> | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
TMat | TBD |
FromFunction<TIn, TOut>(Func<TIn, TOut>)
Creates a Flow<TIn, TOut, TMat> which will use the given function to transform its inputs to outputs. It is equivalent to Akka.Streams.Implementation.Fusing.Select`2
Declaration
public static Flow<TIn, TOut, NotUsed> FromFunction<TIn, TOut>(Func<TIn, TOut> function)
Parameters
Type | Name | Description |
---|---|---|
Func<TIn, TOut> | function | TBD |
Returns
Type | Description |
---|---|
Flow<TIn, TOut, NotUsed> | TBD |
Type Parameters
Name | Description |
---|---|
TIn | TBD |
TOut | TBD |
FromGraph<TIn, TOut, TMat>(IGraph<FlowShape<TIn, TOut>, TMat>)
A graph with the shape of a flow logically is a flow, this method makes it so also in type.
Declaration
public static Flow<TIn, TOut, TMat> FromGraph<TIn, TOut, TMat>(IGraph<FlowShape<TIn, TOut>, TMat> graph)
Parameters
Type | Name | Description |
---|---|---|
IGraph<FlowShape<TIn, TOut>, TMat> | graph | TBD |
Returns
Type | Description |
---|---|
Flow<TIn, TOut, TMat> | TBD |
Type Parameters
Name | Description |
---|---|
TIn | TBD |
TOut | TBD |
TMat | TBD |
FromProcessor<TIn, TOut>(Func<IProcessor<TIn, TOut>>)
Creates flow from the Reactive Streams Reactive.Streams.IProcessor`2.
Declaration
public static Flow<TIn, TOut, NotUsed> FromProcessor<TIn, TOut>(Func<IProcessor<TIn, TOut>> factory)
Parameters
Type | Name | Description |
---|---|---|
Func<Reactive.Streams.IProcessor<TIn, TOut>> | factory | TBD |
Returns
Type | Description |
---|---|
Flow<TIn, TOut, NotUsed> | TBD |
Type Parameters
Name | Description |
---|---|
TIn | TBD |
TOut | TBD |
FromProcessorMaterialized<TIn, TOut, TMat>(Func<(IProcessor<TIn, TOut>, TMat)>)
Creates a Flow from a Reactive Streams Reactive.Streams.IProcessor`2 and returns a materialized value.
Declaration
public static Flow<TIn, TOut, TMat> FromProcessorMaterialized<TIn, TOut, TMat>(Func<(IProcessor<TIn, TOut>, TMat)> factory)
Parameters
Type | Name | Description |
---|---|---|
Func<System.ValueTuple<Reactive.Streams.IProcessor<TIn, TOut>, TMat>> | factory | TBD |
Returns
Type | Description |
---|---|
Flow<TIn, TOut, TMat> | TBD |
Type Parameters
Name | Description |
---|---|
TIn | TBD |
TOut | TBD |
TMat | TBD |
FromSinkAndSource<TIn, TOut, TMat>(IGraph<SinkShape<TIn>, TMat>, IGraph<SourceShape<TOut>, TMat>)
Creates a Flow<TIn, TOut, TMat> from a Sink<TIn, TMat> and a Source<TOut, TMat> where the flow's input will be sent to the sink and the flow's output will come from the source.
Declaration
public static Flow<TIn, TOut, NotUsed> FromSinkAndSource<TIn, TOut, TMat>(IGraph<SinkShape<TIn>, TMat> sink, IGraph<SourceShape<TOut>, TMat> source)
Parameters
Type | Name | Description |
---|---|---|
IGraph<SinkShape<TIn>, TMat> | sink | TBD |
IGraph<SourceShape<TOut>, TMat> | source | TBD |
Returns
Type | Description |
---|---|
Flow<TIn, TOut, NotUsed> | TBD |
Type Parameters
Name | Description |
---|---|
TIn | TBD |
TOut | TBD |
TMat | TBD |
FromSinkAndSource<TIn, TOut, TMat1, TMat2, TMat>(IGraph<SinkShape<TIn>, TMat1>, IGraph<SourceShape<TOut>, TMat2>, Func<TMat1, TMat2, TMat>)
Creates a Flow<TIn, TOut, TMat> from a Sink<TIn, TMat> and a Source<TOut, TMat> where the flow's input will be sent to the sink and the flow's output will come from the source.
The combine
function is used to compose the materialized values of the Sink<TIn, TMat> and Source<TOut, TMat>
into the materialized value of the resulting Flow<TIn, TOut, TMat>.
Declaration
public static Flow<TIn, TOut, TMat> FromSinkAndSource<TIn, TOut, TMat1, TMat2, TMat>(IGraph<SinkShape<TIn>, TMat1> sink, IGraph<SourceShape<TOut>, TMat2> source, Func<TMat1, TMat2, TMat> combine)
Parameters
Type | Name | Description |
---|---|---|
IGraph<SinkShape<TIn>, TMat1> | sink | TBD |
IGraph<SourceShape<TOut>, TMat2> | source | TBD |
Func<TMat1, TMat2, TMat> | combine | TBD |
Returns
Type | Description |
---|---|
Flow<TIn, TOut, TMat> | TBD |
Type Parameters
Name | Description |
---|---|
TIn | TBD |
TOut | TBD |
TMat1 | TBD |
TMat2 | TBD |
TMat | TBD |
Identity<T>()
TBD
Declaration
public static Flow<T, T, NotUsed> Identity<T>()
Returns
Type | Description |
---|---|
Flow<T, T, NotUsed> | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
Identity<T, TMat>()
TBD
Declaration
public static Flow<T, T, TMat> Identity<T, TMat>()
Returns
Type | Description |
---|---|
Flow<T, T, TMat> | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
TMat | TBD |
LazyInitAsync<TIn, TOut, TMat>(Func<Task<Flow<TIn, TOut, TMat>>>)
Creates a real Flow upon receiving the first element. Internal Flow will not be created if there are no elements, because of completion, cancellation, or error.
The materialized value of the Flow is a Task<TResult> that is completed with TMat
when the internal
flow gets materialized or with default
when there where no elements. If the flow materialization (including
the call of the flowFactory
) fails then the future is completed with a failure.
Emits when the internal flow is successfully created and it emits
Cancels when downstream cancels
Declaration
public static Flow<TIn, TOut, Task<Option<TMat>>> LazyInitAsync<TIn, TOut, TMat>(Func<Task<Flow<TIn, TOut, TMat>>> flowFactory)
Parameters
Type | Name | Description |
---|---|---|
Func<Task<Flow<TIn, TOut, TMat>>> | flowFactory | TBD |
Returns
Type | Description |
---|---|
Flow<TIn, TOut, Task<Option<TMat>>> | TBD |
Type Parameters
Name | Description |
---|---|
TIn | TBD |
TOut | TBD |
TMat | TBD |
Setup<TIn, TOut, TMat>(Func<ActorMaterializer, Attributes, Flow<TIn, TOut, TMat>>)
Defers the creation of a Flow until materialization. The factory
function exposes ActorMaterializer which is going to be used during materialization and
Attributes of the Flow returned by this method.
Declaration
public static Flow<TIn, TOut, Task<TMat>> Setup<TIn, TOut, TMat>(Func<ActorMaterializer, Attributes, Flow<TIn, TOut, TMat>> factory)
Parameters
Type | Name | Description |
---|---|---|
Func<ActorMaterializer, Attributes, Flow<TIn, TOut, TMat>> | factory | TBD |
Returns
Type | Description |
---|---|
Flow<TIn, TOut, Task<TMat>> | TBD |
Type Parameters
Name | Description |
---|---|
TIn | TBD |
TOut | TBD |
TMat | TBD |