Class ChannelSink
Assembly: Akka.Streams.dll
Syntax
public static class ChannelSink
Methods
|
Improve this Doc
View Source
AsReader<T>(Int32, Boolean, BoundedChannelFullMode)
Creates a sink that upon materialization, returns a System.Threading.Channels.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
Type |
Name |
Description |
Int32 |
bufferSize |
|
Boolean |
singleReader |
|
System.Threading.Channels.BoundedChannelFullMode |
fullMode |
|
Returns
Type |
Description |
Sink<T, System.Threading.Channels.ChannelReader<T>> |
|
Type Parameters
|
Improve this Doc
View Source
FromWriter<T>(ChannelWriter<T>, Boolean)
Creates a Sink, that will emit incoming events directly into provider System.Threading.Channels.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 |
System.Threading.Channels.ChannelWriter<T> |
writer |
A System.Threading.Channels.ChannelWriter<T> to pass events emitted from materialized graph to.
|
Boolean |
isOwner |
Determines materialized graph should be responsible for completing given writer .
|
Returns
Type Parameters
Name |
Description |
T |
Type of events passed to writer .
|