Class MaterializeAtomic
- java.lang.Object
-
- akka.stream.impl.MaterializeAtomic
-
- All Implemented Interfaces:
Traversal
,java.io.Serializable
,scala.Equals
,scala.Product
public final class MaterializeAtomic extends java.lang.Object implements Traversal, scala.Product, java.io.Serializable
INTERNAL APIArriving at this step means that an atomic module needs to be materialized (or any other activity which assigns something to wired output-input port pairs).
The traversing party must assign port numbers in the following way: - input ports are implicitly assigned to numbers. Every module's input ports are assigned to consecutive numbers according to their order in the shape. In other words, the materializer only needs to keep a counter and increment it for every visited input port. - the assigned number of the first input port for every module should be saved while materializing the module. every output port should be assigned to (base + outToSlots(out.id)) where base is the number of the first input port of the module (or the last unused input number if it has no input ports) and outToSlots is the array provided by the traversal step.
Since the above two rules always require local only computations (except a counter) this achieves positional independence of materializations.
See the
TraversalTestUtils
class and thetestMaterialize
method for a simple example.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MaterializeAtomic(StreamLayout.AtomicModule<Shape,java.lang.Object> module, int[] outToSlots)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MaterializeAtomic
apply(StreamLayout.AtomicModule<Shape,java.lang.Object> module, int[] outToSlots)
boolean
canEqual(java.lang.Object x$1)
MaterializeAtomic
copy(StreamLayout.AtomicModule<Shape,java.lang.Object> module, int[] outToSlots)
StreamLayout.AtomicModule<Shape,java.lang.Object>
copy$default$1()
int[]
copy$default$2()
boolean
equals(java.lang.Object x$1)
int
hashCode()
StreamLayout.AtomicModule<Shape,java.lang.Object>
module()
int[]
outToSlots()
int
productArity()
java.lang.Object
productElement(int x$1)
java.lang.String
productElementName(int x$1)
scala.collection.Iterator<java.lang.Object>
productIterator()
java.lang.String
productPrefix()
Traversal
rewireFirstTo(int relativeOffset)
java.lang.String
toString()
static scala.Option<scala.Tuple2<StreamLayout.AtomicModule<Shape,java.lang.Object>,int[]>>
unapply(MaterializeAtomic x$0)
-
-
-
Constructor Detail
-
MaterializeAtomic
public MaterializeAtomic(StreamLayout.AtomicModule<Shape,java.lang.Object> module, int[] outToSlots)
-
-
Method Detail
-
apply
public static MaterializeAtomic apply(StreamLayout.AtomicModule<Shape,java.lang.Object> module, int[] outToSlots)
-
unapply
public static scala.Option<scala.Tuple2<StreamLayout.AtomicModule<Shape,java.lang.Object>,int[]>> unapply(MaterializeAtomic x$0)
-
module
public StreamLayout.AtomicModule<Shape,java.lang.Object> module()
-
outToSlots
public int[] outToSlots()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
rewireFirstTo
public Traversal rewireFirstTo(int relativeOffset)
- Specified by:
rewireFirstTo
in interfaceTraversal
-
copy
public MaterializeAtomic copy(StreamLayout.AtomicModule<Shape,java.lang.Object> module, int[] outToSlots)
-
copy$default$1
public StreamLayout.AtomicModule<Shape,java.lang.Object> copy$default$1()
-
copy$default$2
public int[] copy$default$2()
-
productPrefix
public java.lang.String productPrefix()
- Specified by:
productPrefix
in interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArity
in interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElement
in interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIterator
in interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqual
in interfacescala.Equals
-
productElementName
public java.lang.String productElementName(int x$1)
- Specified by:
productElementName
in interfacescala.Product
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
equals
in interfacescala.Equals
- Overrides:
equals
in classjava.lang.Object
-
-