Package akka.stream.impl
Class CompletedTraversalBuilder
- java.lang.Object
-
- akka.stream.impl.CompletedTraversalBuilder
-
- All Implemented Interfaces:
TraversalBuilder,java.io.Serializable,scala.Equals,scala.Product,scala.Serializable
public final class CompletedTraversalBuilder extends java.lang.Object implements TraversalBuilder, scala.Product, scala.Serializable
INTERNAL APIReturned by
CompositeTraversalBuilderonce all output ports of a subgraph has been wired. See comments in akka.stream.impl.package for more details.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CompletedTraversalBuilder(Traversal traversalSoFar, int inSlots, scala.collection.immutable.Map<InPort,java.lang.Object> inToOffset, Attributes attributes, OptionVal<IslandTag> islandTag)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OptionVal<IslandTag>$lessinit$greater$default$5()TraversalBuilderadd(TraversalBuilder submodule, Shape shape, scala.Function2<scala.runtime.Nothing$,scala.runtime.Nothing$,java.lang.Object> combineMat)Adds a module to the builder.static CompletedTraversalBuilderapply(Traversal traversalSoFar, int inSlots, scala.collection.immutable.Map<InPort,java.lang.Object> inToOffset, Attributes attributes, OptionVal<IslandTag> islandTag)static OptionVal<IslandTag>apply$default$5()TraversalBuilderassign(OutPort out, int relativeSlot)Finish the wiring of an output port to an input port by assigning the relative slot for the output port.Attributesattributes()booleancanEqual(java.lang.Object x$1)CompletedTraversalBuildercopy(Traversal traversalSoFar, int inSlots, scala.collection.immutable.Map<InPort,java.lang.Object> inToOffset, Attributes attributes, OptionVal<IslandTag> islandTag)Traversalcopy$default$1()intcopy$default$2()scala.collection.immutable.Map<InPort,java.lang.Object>copy$default$3()Attributescopy$default$4()OptionVal<IslandTag>copy$default$5()booleanequals(java.lang.Object x$1)inthashCode()intinSlots()The total number of input ports encountered so far.TraversalBuilderinternalSetAttributes(Attributes attributes)scala.collection.immutable.Map<InPort,java.lang.Object>inToOffset()OptionVal<IslandTag>islandTag()booleanisTraversalComplete()Returns true if the Traversal is available.booleanisUnwired(InPort in)Returns whether the given input port has been wired in the graph or not.booleanisUnwired(OutPort out)Returns whether the given output port has been wired in the graph or not.TraversalBuildermakeIsland(IslandTag islandTag)Wraps the builder in an island that can be materialized differently, using async boundaries to bridge between islands.intoffsetOf(InPort in)Returns the number assigned to a certain input port *relative* to this module.intoffsetOfModule(OutPort out)Returns the base offset (the first number an input port would receive if there is any) of the module to which the port belongs *relative to this builder*.intproductArity()java.lang.ObjectproductElement(int x$1)scala.collection.Iterator<java.lang.Object>productIterator()java.lang.StringproductPrefix()java.lang.StringtoString()TraversalBuildertransformMat(scala.Function1<scala.runtime.Nothing$,java.lang.Object> f)Maps the materialized value produced by the module built-up so far with the provided function, providing a new TraversalBuilder returning the mapped materialized value.Traversaltraversal()Returns the Traversal if ready for this (sub)graph.TraversaltraversalSoFar()static scala.Option<scala.Tuple5<Traversal,java.lang.Object,scala.collection.immutable.Map<InPort,java.lang.Object>,Attributes,OptionVal<IslandTag>>>unapply(CompletedTraversalBuilder x$0)intunwiredOuts()The number of output ports that have not been wired.TraversalBuilderwire(OutPort out, InPort in)Connects two unwired ports in the graph.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface akka.stream.impl.TraversalBuilder
setAttributes
-
-
-
-
Constructor Detail
-
CompletedTraversalBuilder
public CompletedTraversalBuilder(Traversal traversalSoFar, int inSlots, scala.collection.immutable.Map<InPort,java.lang.Object> inToOffset, Attributes attributes, OptionVal<IslandTag> islandTag)
-
-
Method Detail
-
apply
public static CompletedTraversalBuilder apply(Traversal traversalSoFar, int inSlots, scala.collection.immutable.Map<InPort,java.lang.Object> inToOffset, Attributes attributes, OptionVal<IslandTag> islandTag)
-
unapply
public static scala.Option<scala.Tuple5<Traversal,java.lang.Object,scala.collection.immutable.Map<InPort,java.lang.Object>,Attributes,OptionVal<IslandTag>>> unapply(CompletedTraversalBuilder x$0)
-
traversalSoFar
public Traversal traversalSoFar()
-
inSlots
public int inSlots()
Description copied from interface:TraversalBuilderThe total number of input ports encountered so far. Gives the first slot to which a new input port can be assigned (if a new module is added).- Specified by:
inSlotsin interfaceTraversalBuilder- Returns:
- (undocumented)
-
inToOffset
public scala.collection.immutable.Map<InPort,java.lang.Object> inToOffset()
-
attributes
public Attributes attributes()
- Specified by:
attributesin interfaceTraversalBuilder
-
add
public TraversalBuilder add(TraversalBuilder submodule, Shape shape, scala.Function2<scala.runtime.Nothing$,scala.runtime.Nothing$,java.lang.Object> combineMat)
Description copied from interface:TraversalBuilderAdds a module to the builder. It is possible to add a module with a different Shape (import), in this case the ports of the shape MUST have theirmappedTofield pointing to the original ports. The act of being imported will not be reflected in the final Traversal, the Shape is only used by the builder to disambiguate between multiple imported instances of the same module.See append in the
LinearTraversalBuilderfor a more efficient alternative for linear graphs.- Specified by:
addin interfaceTraversalBuilder- Parameters:
submodule- (undocumented)shape- (undocumented)combineMat- (undocumented)- Returns:
- (undocumented)
-
traversal
public Traversal traversal()
Description copied from interface:TraversalBuilderReturns the Traversal if ready for this (sub)graph.- Specified by:
traversalin interfaceTraversalBuilder- Returns:
- (undocumented)
-
transformMat
public TraversalBuilder transformMat(scala.Function1<scala.runtime.Nothing$,java.lang.Object> f)
Description copied from interface:TraversalBuilderMaps the materialized value produced by the module built-up so far with the provided function, providing a new TraversalBuilder returning the mapped materialized value.- Specified by:
transformMatin interfaceTraversalBuilder- Parameters:
f- (undocumented)- Returns:
- (undocumented)
-
offsetOf
public int offsetOf(InPort in)
Description copied from interface:TraversalBuilderReturns the number assigned to a certain input port *relative* to this module.This method only guarantees to return the offset of input ports that have not been wired.
- Specified by:
offsetOfin interfaceTraversalBuilder- Parameters:
in- (undocumented)- Returns:
- (undocumented)
-
isTraversalComplete
public boolean isTraversalComplete()
Description copied from interface:TraversalBuilderReturns true if the Traversal is available. Not all builders are able to build up the Traversal incrementally. Generally a traversal is complete if there are no unwired output ports.- Specified by:
isTraversalCompletein interfaceTraversalBuilder- Returns:
- (undocumented)
-
wire
public TraversalBuilder wire(OutPort out, InPort in)
Description copied from interface:TraversalBuilderConnects two unwired ports in the graph. For imported modules, use the ports of their "import shape". These ports must have theirmappedTofield set and point to the original ports.See append in the
LinearTraversalBuilderfor a more efficient alternative for linear graphs.- Specified by:
wirein interfaceTraversalBuilder- Parameters:
out- (undocumented)in- (undocumented)- Returns:
- (undocumented)
-
internalSetAttributes
public TraversalBuilder internalSetAttributes(Attributes attributes)
- Specified by:
internalSetAttributesin interfaceTraversalBuilder
-
unwiredOuts
public int unwiredOuts()
Description copied from interface:TraversalBuilderThe number of output ports that have not been wired.- Specified by:
unwiredOutsin interfaceTraversalBuilder- Returns:
- (undocumented)
-
makeIsland
public TraversalBuilder makeIsland(IslandTag islandTag)
Description copied from interface:TraversalBuilderWraps the builder in an island that can be materialized differently, using async boundaries to bridge between islands.- Specified by:
makeIslandin interfaceTraversalBuilder- Parameters:
islandTag- (undocumented)- Returns:
- (undocumented)
-
assign
public TraversalBuilder assign(OutPort out, int relativeSlot)
Description copied from interface:TraversalBuilderFinish the wiring of an output port to an input port by assigning the relative slot for the output port.(see
MaterializeAtomicfor details of the resolution process)- Specified by:
assignin interfaceTraversalBuilder- Parameters:
out- (undocumented)relativeSlot- (undocumented)- Returns:
- (undocumented)
-
offsetOfModule
public int offsetOfModule(OutPort out)
Description copied from interface:TraversalBuilderReturns the base offset (the first number an input port would receive if there is any) of the module to which the port belongs *relative to this builder*. This is used to calculate the relative offset of output port mappings (seeMaterializeAtomic).This method only guarantees to return the offset of modules for output ports that have not been wired.
- Specified by:
offsetOfModulein interfaceTraversalBuilder- Parameters:
out- (undocumented)- Returns:
- (undocumented)
-
isUnwired
public boolean isUnwired(OutPort out)
Description copied from interface:TraversalBuilderReturns whether the given output port has been wired in the graph or not.- Specified by:
isUnwiredin interfaceTraversalBuilder- Parameters:
out- (undocumented)- Returns:
- (undocumented)
-
isUnwired
public boolean isUnwired(InPort in)
Description copied from interface:TraversalBuilderReturns whether the given input port has been wired in the graph or not.- Specified by:
isUnwiredin interfaceTraversalBuilder- Parameters:
in- (undocumented)- Returns:
- (undocumented)
-
copy
public CompletedTraversalBuilder copy(Traversal traversalSoFar, int inSlots, scala.collection.immutable.Map<InPort,java.lang.Object> inToOffset, Attributes attributes, OptionVal<IslandTag> islandTag)
-
copy$default$1
public Traversal copy$default$1()
-
copy$default$2
public int copy$default$2()
-
copy$default$3
public scala.collection.immutable.Map<InPort,java.lang.Object> copy$default$3()
-
copy$default$4
public Attributes copy$default$4()
-
productPrefix
public java.lang.String productPrefix()
- Specified by:
productPrefixin interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArityin interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElementin interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIteratorin interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqualin interfacescala.Equals
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
equalsin interfacescala.Equals- Overrides:
equalsin classjava.lang.Object
-
-