Class Window

    • Constructor Detail

      • Window

        public Window​(io.siddhi.query.api.definition.WindowDefinition windowDefinition,
                      SiddhiAppContext siddhiAppContext)
        Construct a Window object.
        Parameters:
        windowDefinition - definition of the window
        siddhiAppContext - siddhi app context of Siddhi
    • Method Detail

      • init

        public void init​(Map<String,​Table> tableMap,
                         Map<String,​Window> eventWindowMap,
                         String windowName,
                         boolean findToBeExecuted)
        Initialize the WindowEvent table by creating WindowProcessor to handle the events.
        Parameters:
        tableMap - map of Tables
        eventWindowMap - map of EventWindows
        windowName - name of the query window belongs to.
        findToBeExecuted - will find will be executed on the window.
      • setPublisher

        public void setPublisher​(StreamJunction.Publisher publisher)
        Set Publisher to which the the output events from internal window have to be sent.
        Parameters:
        publisher - output publisher
      • getWindowDefinition

        public io.siddhi.query.api.definition.WindowDefinition getWindowDefinition()
        Return the WindowDefinition used to construct this Window.
        Returns:
        the window definition
      • add

        public void add​(ComplexEventChunk complexEventChunk)
        Add the given ComplexEventChunk to the Window.
        Parameters:
        complexEventChunk - the event chunk to be added
      • find

        public StreamEvent find​(StateEvent matchingEvent,
                                CompiledCondition compiledCondition)
        To find events from the processor event pool, that the matches the matchingEvent based on finder logic.
        Specified by:
        find in interface FindableProcessor
        Parameters:
        matchingEvent - the event to be matched with the events at the processor
        compiledCondition - the execution element responsible for matching the corresponding events that matches the matchingEvent based on pool of events at Processor
        Returns:
        the matched events
      • compileCondition

        public CompiledCondition compileCondition​(io.siddhi.query.api.expression.Expression condition,
                                                  MatchingMetaInfoHolder matchingMetaInfoHolder,
                                                  List<VariableExpressionExecutor> variableExpressionExecutors,
                                                  Map<String,​Table> tableMap,
                                                  SiddhiQueryContext siddhiQueryContext)
        To construct a finder having the capability of finding events at the processor that corresponds to the incoming matchingEvent and the given matching expression logic.
        Specified by:
        compileCondition in interface FindableProcessor
        Parameters:
        condition - the matching condition
        matchingMetaInfoHolder - the meta structure of the incoming matchingEvent
        variableExpressionExecutors - the list of variable ExpressionExecutors already created
        tableMap - map of event tables
        siddhiQueryContext - current siddhi query context
        Returns:
        compiled Condition having the capability of matching events against the incoming matchingEvent
      • isStateful

        public boolean isStateful()