Interface QueryableProcessor

  • All Superinterfaces:
    FindableProcessor
    All Known Implementing Classes:
    AbstractQueryableRecordTable, TableWindowProcessor

    public interface QueryableProcessor
    extends FindableProcessor
    Interface for all processors which holds a collection of events and supports traversing and finding events from that collection with different selection criteria. query() will be used by OnDemandQuery to get matching event in defined format.
    • Method Detail

      • query

        StreamEvent query​(StateEvent matchingEvent,
                          CompiledCondition compiledCondition,
                          CompiledSelection compiledSelection,
                          io.siddhi.query.api.definition.Attribute[] outputAttributes)
                   throws ConnectionUnavailableException
        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.
        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

        @Deprecated
        StreamEvent query​(StateEvent matchingEvent,
                          CompiledCondition compiledCondition,
                          CompiledSelection compiledSelection)
                   throws ConnectionUnavailableException
        Deprecated.
        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.
        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

        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)
        To construct a selection having the capability of transforming events based on given selection logic.
        Parameters:
        selector - the query selector
        expectedOutputAttributes -
        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