Package org.apache.pekko.stream.javadsl
Class RunnableGraph<Mat>
java.lang.Object
org.apache.pekko.stream.javadsl.RunnableGraph<Mat>
- All Implemented Interfaces:
Graph<ClosedShape,Mat>
Java API
Flow with attached input and output, can be executed.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.pekko.stream.Graph
Graph.GraphMapMatVal<S extends Shape,M> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAttributes(Attributes attr) Add the given attributes to thisGraph.abstract RunnableGraph<Mat>asScala()Converts this Java DSL element to its Scala DSL counterpart.static <Mat> RunnableGraph<Mat>fromGraph(Graph<ClosedShape, Mat> graph) A graph with a closed shape is logically a runnable graph, this method makes it so also in type.abstract <Mat2> RunnableGraph<Mat2>mapMaterializedValue(Function<Mat, Mat2> f) Transform only the materialized value of this RunnableGraph, leaving all other properties as they were.Specifies the name of the Graph.run(ClassicActorSystemProvider systemProvider) Run this flow and return the materialized values of the flow.abstract Matrun(Materializer materializer) Run this flow using a special materializer and return the materialized values of the flow.abstract RunnableGraph<Mat>withAttributes(Attributes attr) Replace the attributes of thisFlowwith the given ones.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.stream.Graph
async, async, async, getAttributes, shape, traversalBuilder
-
Constructor Details
-
RunnableGraph
public RunnableGraph()
-
-
Method Details
-
fromGraph
A graph with a closed shape is logically a runnable graph, this method makes it so also in type. -
run
Run this flow and return the materialized values of the flow.Uses the system materializer.
-
run
Run this flow using a special materializer and return the materialized values of the flow.Prefer the method taking an ActorSystem unless you have special requirements.
-
mapMaterializedValue
Transform only the materialized value of this RunnableGraph, leaving all other properties as they were. -
withAttributes
Description copied from interface:GraphReplace the attributes of thisFlowwith 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:
withAttributesin interfaceGraph<ClosedShape,Mat>
-
addAttributes
Description copied from interface:GraphAdd the given attributes to thisGraph. 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 Source 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:
addAttributesin interfaceGraph<ClosedShape,Mat>
-
named
Description copied from interface:GraphSpecifies the name of the Graph. If the name is null or empty the name is ignored, i.e.Attributes.noneis returned.- Specified by:
namedin interfaceGraph<ClosedShape,Mat>
-
asScala
Converts this Java DSL element to its Scala DSL counterpart.
-