A SinkRef allows sharing a "reference" to a scaladsl.Sink with others, with the main purpose of crossing a network boundary. Usually obtaining a SinkRef would be done via Actor messaging, in which one system asks a remote one, to accept some data from it, and the remote one decides to accept the request to send data in a back-pressured streaming fashion -- using a sink ref.
To create a SinkRef you have to materialize the Sink that you want to obtain a reference to by attaching it to a StreamRefs.sinkRef().
Stream refs can be seen as Reactive Streams over network boundaries. See also pekko.stream.SourceRef which is the dual of a SinkRef.
For additional configuration see reference.conf as well as pekko.stream.StreamRefAttributes.
Not for user extension.
Attributes
- Companion
- object
- Source
- StreamRefs.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Type members
Inherited types
Type-level accessor for the shape parameter of this graph.
Type-level accessor for the shape parameter of this graph.
Attributes
- Inherited from:
- Graph
- Source
- Graph.scala
Value members
Abstract methods
Scala API: Get scaladsl.Sink underlying to this source ref.
Concrete methods
Converts this Scala DSL element to it's Java DSL counterpart.
Transform this Sink by applying a function to each incoming upstream element before it is passed to the Sink
Transform this Sink by applying a function to each incoming upstream element before it is passed to the Sink
'''Backpressures when''' original Sink backpressures
'''Cancels when''' original Sink cancels
Attributes
- Since
-
1.1.0
- Source
- Sink.scala
Java API: Get javadsl.Sink underlying to this source ref.
Transform only the materialized value of this Sink, leaving all other properties as they were.
Transform only the materialized value of this Sink, leaving all other properties as they were.
Attributes
- Source
- Sink.scala
Materializes this Sink, immediately returning (1) its materialized value, and (2) a new Sink that can be consume elements 'into' the pre-materialized one.
Materializes this Sink, immediately returning (1) its materialized value, and (2) a new Sink that can be consume elements 'into' the pre-materialized one.
Useful for when you need a materialized value of a Sink when handing it out to someone to materialize it for you.
Attributes
- Source
- Sink.scala
Connect this Sink to a Source and run it. The returned value is the materialized value of the Source, e.g. the Subscriber of a Source#subscriber.
Connect this Sink to a Source and run it. The returned value is the materialized value of the Source, e.g. the Subscriber of a Source#subscriber.
Note that the ActorSystem can be used as the implicit materializer parameter to use the pekko.stream.SystemMaterializer for running the stream.
Attributes
- Source
- Sink.scala
Concrete fields
The shape of a graph is all that is externally visible: its inlets and outlets.
The shape of a graph is all that is externally visible: its inlets and outlets.
Attributes
- Source
- Sink.scala
INTERNAL API.
INTERNAL API.
Every materializable element must be backed by a stream layout module
Attributes
- Source
- Sink.scala