Class ChannelSink
Assembly: Akka.Streams.dll
Syntax
public static class ChannelSink
Methods
|
Edit this page
View Source
AsReader<T>(int, bool, BoundedChannelFullMode)
Creates a sink that upon materialization, returns a ChannelReader<T> connected with
this materialized graph. It can then be used to consume events incoming from the graph. It will
also be completed once upstream completes.
Declaration
public static Sink<T, ChannelReader<T>> AsReader<T>(int bufferSize, bool singleReader = false, BoundedChannelFullMode fullMode = BoundedChannelFullMode.Wait)
Parameters
Returns
Type Parameters
|
Edit this page
View Source
FromWriter<T>(ChannelWriter<T>, bool)
Creates a Sink, that will emit incoming events directly into provider ChannelWriter<T>.
It will handle problems such as backpressure and writer
. When isOwner
is set to true
, it will also take responsibility to complete given writer
.
Declaration
public static Sink<T, NotUsed> FromWriter<T>(ChannelWriter<T> writer, bool isOwner)
Parameters
Type |
Name |
Description |
ChannelWriter<T> |
writer |
A ChannelWriter<T> to pass events emitted from materialized graph to.
|
bool |
isOwner |
Determines materialized graph should be responsible for completing given writer .
|
Returns
Type Parameters
Name |
Description |
T |
Type of events passed to writer .
|