Class TableWindowProcessor

    • Constructor Detail

      • TableWindowProcessor

        public TableWindowProcessor​(Table table)
    • Method Detail

      • isOptimisableLookup

        public boolean isOptimisableLookup()
      • init

        protected StateFactory init​(ExpressionExecutor[] attributeExpressionExecutors,
                                    ConfigReader configReader,
                                    StreamEventClonerHolder streamEventClonerHolder,
                                    boolean outputExpectsExpiredEvents,
                                    boolean findToBeExecuted,
                                    SiddhiQueryContext siddhiQueryContext)
        Description copied from class: BatchingWindowProcessor
        The init method of the WindowProcessor, this method will be called before other methods
        Specified by:
        init in class BatchingWindowProcessor
        Parameters:
        attributeExpressionExecutors - the executors of each function parameters
        configReader - the config reader of window
        streamEventClonerHolder - stream event cloner holder
        outputExpectsExpiredEvents - is expired events sent as output
        findToBeExecuted - find operation will be performed
        siddhiQueryContext - the context of the siddhi query
      • process

        protected void process​(ComplexEventChunk streamEventChunk,
                               Processor nextProcessor,
                               StreamEventCloner streamEventCloner,
                               State state)
        Description copied from class: BatchingWindowProcessor
        The main processing method that will be called upon event arrival
        Specified by:
        process in class BatchingWindowProcessor
        Parameters:
        streamEventChunk - the stream event chunk that need to be processed
        nextProcessor - the next processor to which the success events need to be passed
        streamEventCloner - helps to clone the incoming event for local storage or modification
        state - current state of the processor
      • find

        public StreamEvent find​(StateEvent matchingEvent,
                                CompiledCondition compiledCondition)
        Description copied from interface: FindableProcessor
        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)
        Description copied from interface: FindableProcessor
        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
      • start

        public void start()
        Description copied from interface: ExternalReferencedHolder
        This will be called only once and this can be used to acquire required resources for the processing element. This will be called after initializing the system and before starting to process the events.
        Specified by:
        start in interface ExternalReferencedHolder
      • stop

        public void stop()
        Description copied from interface: ExternalReferencedHolder
        This will be called only once and this can be used to release the acquired resources for processing. This will be called before shutting down the system.
        Specified by:
        stop in interface ExternalReferencedHolder
      • query

        public StreamEvent query​(StateEvent matchingEvent,
                                 CompiledCondition compiledCondition,
                                 CompiledSelection compiledSelection,
                                 io.siddhi.query.api.definition.Attribute[] outputAttributes)
                          throws ConnectionUnavailableException
        Description copied from interface: QueryableProcessor
        To find events from the processor event pool, that the matches the matchingEvent based on finder logic and return them based on the defined selection.
        Specified by:
        query in interface QueryableProcessor
        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
        compiledSelection - the execution element responsible for transforming the corresponding events to the given selection
        outputAttributes - the output attributes specified in the query.
        Returns:
        the matched events
        Throws:
        ConnectionUnavailableException
      • query

        public StreamEvent query​(StateEvent matchingEvent,
                                 CompiledCondition compiledCondition,
                                 CompiledSelection compiledSelection)
                          throws ConnectionUnavailableException
        Description copied from interface: QueryableProcessor
        To find events from the processor event pool, that the matches the matchingEvent based on finder logic and return them based on the defined selection.
        Specified by:
        query in interface QueryableProcessor
        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
        compiledSelection - the execution element responsible for transforming the corresponding events to the given selection
        Returns:
        the matched events
        Throws:
        ConnectionUnavailableException
      • compileSelection

        public CompiledSelection compileSelection​(io.siddhi.query.api.execution.query.selection.Selector selector,
                                                  List<io.siddhi.query.api.definition.Attribute> expectedOutputAttributes,
                                                  MatchingMetaInfoHolder matchingMetaInfoHolder,
                                                  List<VariableExpressionExecutor> variableExpressionExecutors,
                                                  Map<String,​Table> tableMap,
                                                  SiddhiQueryContext siddhiQueryContext)
        Description copied from interface: QueryableProcessor
        To construct a selection having the capability of transforming events based on given selection logic.
        Specified by:
        compileSelection in interface QueryableProcessor
        Parameters:
        selector - the query selector
        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 Selection having the capability of transforming events based on the selection
      • getTable

        public Table getTable()
      • getTableId

        public String getTableId()