public static interface StreamLayout.Module
Modifier and Type | Method and Description |
---|---|
Attributes |
attributes() |
StreamLayout.Module |
carbonCopy()
The purpose of this method is to create a copy to be included in a larger
graph such that port identity clashes are avoided.
|
StreamLayout.Module |
compose(StreamLayout.Module that)
Creates a new Module which is
this Module composed with that Module. |
<A,B,C> StreamLayout.Module |
compose(StreamLayout.Module that,
scala.Function2<A,B,C> f)
Creates a new Module which is
this Module composed with that Module,
using the given function f to compose the materialized value of this with
the materialized value of that . |
StreamLayout.Module |
composeNoMat(StreamLayout.Module that)
Creates a new Module which is
this Module composed with that Module. |
scala.collection.immutable.Map<OutPort,InPort> |
downstreams() |
boolean |
equals(java.lang.Object obj) |
StreamLayout.Module |
fuse(StreamLayout.Module that,
OutPort from,
InPort to)
Fuses this Module to
that Module by wiring together from and to ,
retaining the materialized value of this in the result |
<A,B,C> StreamLayout.Module |
fuse(StreamLayout.Module that,
OutPort from,
InPort to,
scala.Function2<A,B,C> f)
Fuses this Module to
that Module by wiring together from and to ,
transforming the materialized values of this and that using the
provided function f |
int |
hashCode() |
scala.collection.immutable.Set<InPort> |
inPorts() |
boolean |
isAtomic() |
boolean |
isBidiFlow() |
boolean |
isCopied() |
boolean |
isFlow() |
boolean |
isFused() |
boolean |
isRunnable() |
boolean |
isSealed() |
boolean |
isSink() |
boolean |
isSource() |
StreamLayout.MaterializedValueNode |
materializedValueComputation() |
scala.collection.immutable.Set<OutPort> |
outPorts() |
StreamLayout.Module |
replaceShape(Shape s)
Verify that the given Shape has the same ports and return a new module with that shape.
|
Shape |
shape() |
scala.collection.immutable.Set<StreamLayout.Module> |
subModules() |
StreamLayout.Module |
transformMaterializedValue(scala.Function1<java.lang.Object,java.lang.Object> f) |
scala.collection.immutable.Map<InPort,OutPort> |
upstreams() |
StreamLayout.Module |
wire(OutPort from,
InPort to)
Creates a new Module based on the current Module but with
the given OutPort wired to the given InPort.
|
StreamLayout.Module |
withAttributes(Attributes attributes) |
Shape shape()
StreamLayout.Module replaceShape(Shape s)
Please note that this method MUST NOT be implemented using a CopiedModule since the purpose of replaceShape can also be to rearrange the ports (as in BidiFlow.reversed) and that purpose would be defeated.
s
- (undocumented)scala.collection.immutable.Set<InPort> inPorts()
scala.collection.immutable.Set<OutPort> outPorts()
boolean isRunnable()
boolean isSink()
boolean isSource()
boolean isFlow()
boolean isBidiFlow()
boolean isAtomic()
boolean isCopied()
boolean isFused()
StreamLayout.Module fuse(StreamLayout.Module that, OutPort from, InPort to)
that
Module by wiring together from
and to
,
retaining the materialized value of this
in the result
that
- a Module to fuse withfrom
- the data source to wireto
- the data sink to wirethis
and that
<A,B,C> StreamLayout.Module fuse(StreamLayout.Module that, OutPort from, InPort to, scala.Function2<A,B,C> f)
that
Module by wiring together from
and to
,
transforming the materialized values of this
and that
using the
provided function f
that
- a Module to fuse withfrom
- the data source to wireto
- the data sink to wiref
- the function to apply to the materialized valuesthis
and that
StreamLayout.Module wire(OutPort from, InPort to)
from
- the OutPort to wireto
- the InPort to wireStreamLayout.Module transformMaterializedValue(scala.Function1<java.lang.Object,java.lang.Object> f)
StreamLayout.Module compose(StreamLayout.Module that)
this
Module composed with that
Module.
that
- a Module to be composed with (cannot be itself)this
and that
<A,B,C> StreamLayout.Module compose(StreamLayout.Module that, scala.Function2<A,B,C> f)
this
Module composed with that
Module,
using the given function f
to compose the materialized value of this
with
the materialized value of that
.
that
- a Module to be composed with (cannot be itself)f
- a function which combines the materialized valuesthis
and that
StreamLayout.Module composeNoMat(StreamLayout.Module that)
this
Module composed with that
Module.
The difference to compose(that) is that this version completely ignores the materialized value
computation of that
while the normal version executes the computation and discards its result.
This means that this version must not be used for user-provided that
modules because users may
transform materialized values only to achieve some side-effect; it can only be
used where we know that there is no meaningful computation to be done (like for
MaterializedValueSource).
that
- a Module to be composed with (cannot be itself)this
and that
scala.collection.immutable.Set<StreamLayout.Module> subModules()
boolean isSealed()
StreamLayout.MaterializedValueNode materializedValueComputation()
StreamLayout.Module carbonCopy()
Attributes attributes()
StreamLayout.Module withAttributes(Attributes attributes)
int hashCode()
hashCode
in class java.lang.Object
boolean equals(java.lang.Object obj)
equals
in class java.lang.Object