Class GraphStageLogic.SubSinkInlet<T>

java.lang.Object
org.apache.pekko.stream.stage.GraphStageLogic.SubSinkInlet<T>
Enclosing class:
GraphStageLogic

public class GraphStageLogic.SubSinkInlet<T> extends Object
INTERNAL API

This allows the dynamic creation of an Inlet for a GraphStage which is connected to a Sink that is available for materialization (e.g. using the subFusingMaterializer). Completion, cancellation and failure of the parent operator is automatically delegated to instances of SubSinkInlet to avoid resource leaks.

To be thread safe this method must only be called from either the constructor of the graph operator during materialization or one of the methods invoked by the graph operator machinery, such as onPush and onPull.

  • Constructor Details

    • SubSinkInlet

      public SubSinkInlet(String name)
  • Method Details

    • cancel

      public void cancel()
    • cancel

      public void cancel(Throwable cause)
    • grab

      public T grab()
    • hasBeenPulled

      public boolean hasBeenPulled()
    • isAvailable

      public boolean isAvailable()
    • isClosed

      public boolean isClosed()
    • pull

      public void pull()
    • setHandler

      public void setHandler(InHandler handler)
    • sink

      public Graph<SinkShape<T>,NotUsed> sink()
    • toString

      public String toString()
      Overrides:
      toString in class Object