trait SinkRef[In] extends AnyRef

A SinkRef allows sharing a "reference" to a 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 akka.stream.SourceRef which is the dual of a SinkRef.

For additional configuration see reference.conf as well as akka.stream.StreamRefAttributes.

Not for user extension.

Annotations
@DoNotInherit()
Source
StreamRefs.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SinkRef
  2. AnyRef
  3. Any
Implicitly
  1. by convertRefToSink
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def sink(): Sink[In, NotUsed]

    Scala API: Get Sink underlying to this source ref.

Concrete Value Members

  1. def addAttributes(attr: Attributes): Sink[In, NotUsed]

    Add the given attributes to this Sink.

    Add the given attributes to this Sink. If the specific attribute was already present on this graph this means the added attribute will be more specific than the existing one. If this Sink is a composite of multiple graphs, new attributes on the composite will be less specific than attributes set directly on the individual graphs of the composite.

    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Graph
  2. def asJava[JIn <: In]: Sink[JIn, NotUsed]

    Converts this Scala DSL element to it's Java DSL counterpart.

    Converts this Scala DSL element to it's Java DSL counterpart.

    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Sink
  3. def async(dispatcher: String, inputBufferSize: Int): Sink[In, NotUsed]

    Put an asynchronous boundary around this Graph

    Put an asynchronous boundary around this Graph

    dispatcher

    Run the graph on this dispatcher

    inputBufferSize

    Set the input buffer to this size for the graph

    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Graph
  4. def async(dispatcher: String): Sink[In, NotUsed]

    Put an asynchronous boundary around this Graph

    Put an asynchronous boundary around this Graph

    dispatcher

    Run the graph on this dispatcher

    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Graph
  5. def async: Sink[In, NotUsed]

    Put an asynchronous boundary around this Source

    Put an asynchronous boundary around this Source

    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Graph
  6. def contramap[In2](f: (In2) => In): Sink[In2, NotUsed]

    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

    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Sink
  7. def getAttributes: Attributes
    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Graph
  8. final def getSink(): Sink[In, NotUsed]

    Java API: Get javadsl.Sink underlying to this source ref.

  9. def mapMaterializedValue[Mat2](f: (NotUsed) => Mat2): Sink[In, Mat2]

    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.

    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Sink
  10. def named(name: String): Sink[In, NotUsed]

    Add a name attribute to this Sink.

    Add a name attribute to this Sink.

    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Graph
  11. def preMaterialize()(implicit materializer: Materializer): (, Sink[In, NotUsed])

    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.

    Note that preMaterialize is implemented through a reactive streams Subscriber which means that a buffer is introduced and that errors are not propagated upstream but are turned into cancellations without error details.

    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Sink
  12. def runWith[Mat2](source: [SourceShape[In], Mat2])(implicit materializer: Materializer): Mat2

    Connect this Sink to a Source and run it.

    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 akka.stream.SystemMaterializer for running the stream.

    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Sink
  13. val shape: SinkShape[In]

    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.

    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Graph
  14. val traversalBuilder: LinearTraversalBuilder

    INTERNAL API.

    INTERNAL API.

    Every materializable element must be backed by a stream layout module

    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Graph
  15. def withAttributes(attr: Attributes): Sink[In, NotUsed]

    Replace the attributes of this Sink with the given ones.

    Replace the attributes of this Sink with the given ones. If this Sink is a composite of multiple graphs, new attributes on the composite will be less specific than attributes set directly on the individual graphs of the composite.

    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Definition Classes
    Graph

Shadowed Implicit Value Members

  1. def toString(): String
    Implicit
    This member is added by an implicit conversion from SinkRef[In] toSink[In, ] performed by method convertRefToSink in akka.stream.SinkRef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (sinkRef: Sink[In, NotUsed]).toString()
    Definition Classes
    Sink → AnyRef → Any