Class BaseAssemblyNode
java.lang.Object
com.espertech.esper.common.internal.epl.join.assemble.BaseAssemblyNode
- All Implemented Interfaces:
ResultAssembler
- Direct Known Subclasses:
BranchOptionalAssemblyNode
,BranchRequiredAssemblyNode
,CartesianProdAssemblyNode
,LeafAssemblyNode
,RootCartProdAssemblyNode
,RootOptionalAssemblyNode
,RootRequiredAssemblyNode
Represents a node in a tree responsible for assembling outer join query results.
The tree is double-linked, child nodes know each parent and parent know all child nodes.
Each specific subclass of this abstract assembly node is dedicated to assembling results for a certain event stream.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final List<BaseAssemblyNode>
Child nodes.protected final int
Number of streams in statement.protected ResultAssembler
Parent node.protected final int
Stream number. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(BaseAssemblyNode childNode) Add a child node.protected List<BaseAssemblyNode>
Returns child nodes.protected int
Returns the stream number.protected int[]
Returns an array of stream numbers that lists all child node's stream numbers.abstract void
Provides results to assembly nodes for initialization.abstract void
print
(IndentWriter indentWriter) Output this node using writer, not outputting child nodes.abstract void
Process results.void
setParentAssembler
(ResultAssembler resultAssembler) 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.epl.join.assemble.ResultAssembler
result
-
Field Details
-
parentNode
Parent node. -
childNodes
Child nodes. -
streamNum
protected final int streamNumStream number. -
numStreams
protected final int numStreamsNumber of streams in statement.
-
-
Constructor Details
-
BaseAssemblyNode
protected BaseAssemblyNode(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
-
init
Provides results to assembly nodes for initialization.- Parameters:
result
- is a list of result nodes per stream
-
process
public abstract void process(List<Node>[] result, Collection<EventBean[]> resultFinalRows, EventBean resultRootEvent) Process results.- Parameters:
result
- is a list of result nodes per streamresultFinalRows
- final row collectionresultRootEvent
- root event
-
print
Output this node using writer, not outputting child nodes.- Parameters:
indentWriter
- to use for output
-
setParentAssembler
Set parent node.- Parameters:
resultAssembler
- is the parent node
-
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
-
getSubstreams
protected int[] getSubstreams()Returns an array of stream numbers that lists all child node's stream numbers.- Returns:
- child node stream numbers
-