|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.eql.join.assemble.BaseAssemblyNode
public abstract class BaseAssemblyNode
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 | |
---|---|
protected List<BaseAssemblyNode> |
childNodes
Child nodes. |
protected int |
numStreams
Number of streams in statement. |
protected ResultAssembler |
parentNode
Parent node. |
protected int |
streamNum
Stream number. |
Constructor Summary | |
---|---|
protected |
BaseAssemblyNode(int streamNum,
int numStreams)
Ctor. |
Method Summary | |
---|---|
void |
addChild(BaseAssemblyNode childNode)
Add a child node. |
protected List<BaseAssemblyNode> |
getChildNodes()
Returns child nodes. |
static List<BaseAssemblyNode> |
getDescendentNodesBottomUp(BaseAssemblyNode 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. |
protected ResultAssembler |
getParentAssembler()
Returns parent node. |
protected int |
getStreamNum()
Returns the stream number. |
protected int[] |
getSubstreams()
Returns an array of stream numbers that lists all child node's stream numbers. |
abstract void |
init(List<Node>[] result)
Provides results to assembly nodes for initialization. |
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. |
abstract void |
process(List<Node>[] result)
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 net.esper.eql.join.assemble.ResultAssembler |
---|
result |
Field Detail |
---|
protected ResultAssembler parentNode
protected final List<BaseAssemblyNode> childNodes
protected final int streamNum
protected final int numStreams
Constructor Detail |
---|
protected BaseAssemblyNode(int streamNum, int numStreams)
streamNum
- - stream number of the event stream that this node assembles results for.numStreams
- - number of streamsMethod Detail |
---|
public abstract void init(List<Node>[] result)
result
- is a list of result nodes per streampublic abstract void process(List<Node>[] result)
result
- is a list of result nodes per streampublic abstract void print(IndentWriter indentWriter)
indentWriter
- to use for outputpublic void setParentAssembler(ResultAssembler resultAssembler)
resultAssembler
- is the parent nodepublic void addChild(BaseAssemblyNode childNode)
childNode
- to addprotected int getStreamNum()
protected List<BaseAssemblyNode> getChildNodes()
protected ResultAssembler getParentAssembler()
protected int[] getSubstreams()
public void printDescendends(IndentWriter indentWriter)
indentWriter
- to output topublic static List<BaseAssemblyNode> getDescendentNodesBottomUp(BaseAssemblyNode topNode)
topNode
- is the root node of a tree structure
|
© 2007 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |