Class BaseAssemblyNodeFactory
java.lang.Object
com.espertech.esper.common.internal.epl.join.assemble.BaseAssemblyNodeFactory
- All Implemented Interfaces:
CodegenMakeable<SAIFFInitializeSymbol>
- Direct Known Subclasses:
BranchOptionalAssemblyNodeFactory
,BranchRequiredAssemblyNodeFactory
,CartesianProdAssemblyNodeFactory
,LeafAssemblyNodeFactory
,RootCartProdAssemblyNodeFactory
,RootOptionalAssemblyNodeFactory
,RootRequiredAssemblyNodeFactory
public abstract class BaseAssemblyNodeFactory
extends Object
implements CodegenMakeable<SAIFFInitializeSymbol>
Represents the factory of a node in a tree responsible for assembling outer join query results.
The tree of factory nodes is double-linked, child nodes know each parent and parent know all child nodes.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final List<BaseAssemblyNodeFactory>
Child nodes.static final EPTypeClass
static final EPTypeClass
protected final int
Number of streams in statement.protected BaseAssemblyNodeFactory
Parent node.protected final int
Stream number. -
Constructor Summary
ModifierConstructorDescriptionprotected
BaseAssemblyNodeFactory
(int streamNum, int numStreams) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(BaseAssemblyNodeFactory childNode) Add a child node.Returns child nodes.static List<BaseAssemblyNodeFactory>
Returns all descendent nodes to the top node in a list in which the utmost descendants are listed first and the top node itself is listed last.protected int
Returns the stream number.abstract BaseAssemblyNode
abstract void
print
(IndentWriter indentWriter) Output this node using writer, not outputting child nodes.void
printDescendends
(IndentWriter indentWriter) Output this node and all descendent nodes using writer, outputting child nodes.void
setParent
(BaseAssemblyNodeFactory parent) Set parent node.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.espertech.esper.common.internal.bytecodemodel.util.CodegenMakeable
make
-
Field Details
-
EPTYPE
-
EPTYPEARRAY
-
parentNode
Parent node. -
childNodes
Child nodes. -
streamNum
protected final int streamNumStream number. -
numStreams
protected final int numStreamsNumber of streams in statement.
-
-
Constructor Details
-
BaseAssemblyNodeFactory
protected BaseAssemblyNodeFactory(int streamNum, int numStreams) Ctor.- Parameters:
streamNum
- - stream number of the event stream that this node assembles results for.numStreams
- - number of streams
-
-
Method Details
-
makeAssemblerUnassociated
-
print
Output this node using writer, not outputting child nodes.- Parameters:
indentWriter
- to use for output
-
setParent
Set parent node.- Parameters:
parent
- parent node
-
getParentNode
-
addChild
Add a child node.- Parameters:
childNode
- to add
-
getStreamNum
protected int getStreamNum()Returns the stream number.- Returns:
- stream number
-
getChildNodes
Returns child nodes.- Returns:
- child nodes
-
printDescendends
Output this node and all descendent nodes using writer, outputting child nodes.- Parameters:
indentWriter
- to output to
-
getDescendentNodesBottomUp
public static List<BaseAssemblyNodeFactory> getDescendentNodesBottomUp(BaseAssemblyNodeFactory topNode) Returns all descendent nodes to the top node in a list in which the utmost descendants are listed first and the top node itself is listed last.- Parameters:
topNode
- is the root node of a tree structure- Returns:
- list of nodes with utmost descendants first ordered by level of depth in tree with top node last
-