Class GraphStageWithMaterializedValue<S extends Shape,M>

java.lang.Object
org.apache.pekko.stream.stage.GraphStageWithMaterializedValue<S,M>
All Implemented Interfaces:
Graph<S,M>
Direct Known Subclasses:
AbstractGraphStageWithMaterializedValue, GraphStage, KillSwitches.UniqueBidiKillSwitchStage$, KillSwitches.UniqueKillSwitchStage$

public abstract class GraphStageWithMaterializedValue<S extends Shape,M> extends Object implements Graph<S,M>
Scala API: A GraphStage represents a reusable graph stream processing operator.

Extend this GraphStageWithMaterializedValue if you want to provide a materialized value, represented by the type parameter M. If your GraphStage does not need to provide a materialized value you can instead extende GraphStage which materializes a NotUsed value.

A GraphStage consists of a Shape which describes its input and output ports and a factory function that creates a GraphStageLogic which implements the processing logic that ties the ports together.

See also AbstractGraphStageWithMaterializedValue for Java DSL for this operator.

  • Constructor Details

    • GraphStageWithMaterializedValue

      public GraphStageWithMaterializedValue()
  • Method Details

    • createLogicAndMaterializedValue

      public abstract scala.Tuple2<GraphStageLogic,M> createLogicAndMaterializedValue(Attributes inheritedAttributes) throws Exception
      Throws:
      Exception
    • initialAttributes

      protected Attributes initialAttributes()
    • withAttributes

      public final Graph<S,M> withAttributes(Attributes attr)
      Description copied from interface: Graph
      Replace the attributes of this Flow with the given ones. If this Flow 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.
      Specified by:
      withAttributes in interface Graph<S extends Shape,M>