public static class GraphDSL.Builder<M>
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
<S extends Shape> |
add(Graph<S,?> graph)
Import a graph into this module, performing a deep copy, discarding its
materialized value and returning the copied Ports that are now to be
connected.
|
<S extends Shape,A> |
add(Graph<S,?> graph,
scala.Function1<A,java.lang.Object> transform)
INTERNAL API.
|
<S extends Shape,A,B> |
add(Graph<S,?> graph,
scala.Function2<A,B,java.lang.Object> combine)
INTERNAL API.
|
<T,U> void |
addEdge(Outlet<T> from,
Inlet<U> to)
INTERNAL API
|
GraphDSL.Builder<M> |
asJava()
Converts this Scala DSL element to it's Java DSL counterpart.
|
Outlet<M> |
materializedValue()
Returns an
Outlet that gives access to the materialized value of this graph. |
StreamLayout.Module |
module() |
public <T,U> void addEdge(Outlet<T> from, Inlet<U> to)
from
- (undocumented)to
- (undocumented)public <S extends Shape> S add(Graph<S,?> graph)
graph
- (undocumented)public <S extends Shape,A> S add(Graph<S,?> graph, scala.Function1<A,java.lang.Object> transform)
This is only used by the materialization-importing apply methods of Source, Flow, Sink and Graph.
graph
- (undocumented)transform
- (undocumented)public <S extends Shape,A,B> S add(Graph<S,?> graph, scala.Function2<A,B,java.lang.Object> combine)
This is only used by the materialization-importing apply methods of Source, Flow, Sink and Graph.
graph
- (undocumented)combine
- (undocumented)public Outlet<M> materializedValue()
Outlet
that gives access to the materialized value of this graph. Once the graph is materialized
this outlet will emit exactly one element which is the materialized value. It is possible to expose this
outlet as an externally accessible outlet of a Source
, Sink
, Flow
or BidiFlow
.
It is possible to call this method multiple times to get multiple Outlet
instances if necessary. All of
the outlets will emit the materialized value.
Be careful to not to feed the result of this outlet to a stage that produces the materialized value itself (for
example to a Sink.fold(U, scala.Function2<U, T, U>)
that contributes to the materialized value) since that might lead to an unresolvable
dependency cycle.
public StreamLayout.Module module()
public GraphDSL.Builder<M> asJava()