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 Details

    • EPTYPE

      public static final EPTypeClass EPTYPE
    • EPTYPEARRAY

      public static final EPTypeClass EPTYPEARRAY
    • parentNode

      protected BaseAssemblyNodeFactory parentNode
      Parent node.
    • childNodes

      protected final List<BaseAssemblyNodeFactory> childNodes
      Child nodes.
    • streamNum

      protected final int streamNum
      Stream number.
    • numStreams

      protected final int numStreams
      Number 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

      public abstract BaseAssemblyNode makeAssemblerUnassociated()
    • print

      public abstract void print(IndentWriter indentWriter)
      Output this node using writer, not outputting child nodes.
      Parameters:
      indentWriter - to use for output
    • setParent

      public void setParent(BaseAssemblyNodeFactory parent)
      Set parent node.
      Parameters:
      parent - parent node
    • getParentNode

      public BaseAssemblyNodeFactory getParentNode()
    • addChild

      public void addChild(BaseAssemblyNodeFactory childNode)
      Add a child node.
      Parameters:
      childNode - to add
    • getStreamNum

      protected int getStreamNum()
      Returns the stream number.
      Returns:
      stream number
    • getChildNodes

      public List<BaseAssemblyNodeFactory> getChildNodes()
      Returns child nodes.
      Returns:
      child nodes
    • printDescendends

      public void printDescendends(IndentWriter indentWriter)
      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