Class ChannelSink
Inherited Members
Namespace: Akka.Streams.Dsl
Assembly: Akka.Streams.dll
Syntax
public static class ChannelSink
Methods
| Edit this page View SourceAsReader<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
| Type | Name | Description |
|---|---|---|
| int | bufferSize | |
| bool | singleReader | |
| BoundedChannelFullMode | fullMode |
Returns
| Type | Description |
|---|---|
| Sink<T, ChannelReader<T>> |
Type Parameters
| Name | Description |
|---|---|
| T |
FromWriter<T>(ChannelWriter<T>, bool)
Creates a Sink that will emit incoming events directly into the provided ChannelWriter<T>. It will handle backpressure automatically by respecting the channel's capacity.
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 the materialized graph to. |
| bool | isOwner | Determines whether the materialized graph should take ownership of the |
Returns
| Type | Description |
|---|---|
| Sink<T, NotUsed> | A Sink<TIn, TMat> that writes to the provided channel. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of events passed to |
Edit this page