A '''channel''' that can be used for inter-process communication, implemented in terms of
LISTEN
and NOTIFY
. All instances start life as a Channel[F, String, Notification]
but can
be mapped out to different input and output types. See the linked documentation for more
information on the transactional semantics of these operations.
Attributes
- See also:
- Companion:
- object
- Source:
- Channel.scala
- Graph
- Supertypes
- Self type
Members list
Notifications
Construct a Stream
that subscribes to notifications for this Channel, emits any notifications
that arrive (this can happen at any time), then unsubscribes when the stream is terminated.
Note that once such a stream is started it is important to consume all notifications as quickly
as possible to avoid blocking message processing for other operations on the Session
(although typically a dedicated Session
will receive channel notifications so this won't be
an issue).
Construct a Stream
that subscribes to notifications for this Channel, emits any notifications
that arrive (this can happen at any time), then unsubscribes when the stream is terminated.
Note that once such a stream is started it is important to consume all notifications as quickly
as possible to avoid blocking message processing for other operations on the Session
(although typically a dedicated Session
will receive channel notifications so this won't be
an issue).
Attributes
- maxQueued
the maximum number of notifications to hold in a queue before [semantically] blocking message exchange on the controlling
Session
.- See also:
- Source:
- Channel.scala
Construct a Resource[F, Stream]
that subscribes to notifications for this Channel that emits any notifications
that arrive (this can happen at any time) once resource is acquired and unsubscribes when the resource is released.
Note that once such a stream is started it is important to consume all notifications as quickly
as possible to avoid blocking message processing for other operations on the Session
(although typically a dedicated Session
will receive channel notifications so this won't be
an issue).
Construct a Resource[F, Stream]
that subscribes to notifications for this Channel that emits any notifications
that arrive (this can happen at any time) once resource is acquired and unsubscribes when the resource is released.
Note that once such a stream is started it is important to consume all notifications as quickly
as possible to avoid blocking message processing for other operations on the Session
(although typically a dedicated Session
will receive channel notifications so this won't be
an issue).
Attributes
- maxQueued
the maximum number of notifications to hold in a queue before [semantically] blocking message exchange on the controlling
Session
.- See also:
- Source:
- Channel.scala
Send a notification on the given channel. Note that if the session is in an active transaction the notification will only be sent if the transaction is committed. See the linked documentation for more information.
Send a notification on the given channel. Note that if the session is in an active transaction the notification will only be sent if the transaction is committed. See the linked documentation for more information.
Attributes
- See also:
- Source:
- Channel.scala
Transformations
Contramap messages from a new type C
, yielding an Channel[D, C, B]
.
Contramap inputs from a new type C
and map outputs to a new type D
, yielding a
Channel[F, C, D]
.
Contramap inputs from a new type C
and map outputs to a new type D
, yielding a
Channel[F, C, D]
.
Attributes
- Source:
- Channel.scala
Map notifications to a new type D
, yielding an Channel[D, A, D]
.
Transform this Channel
by a given FunctionK
.
Value members
Concrete methods
This Channel
acts as an fs2 Pipe
.