public class TableWindowProcessor extends BatchingWindowProcessor implements QueryableProcessor
WindowProcessor
which represent a Window operating based on Table
.attributeExpressionExecutors, attributeExpressionLength, complexEventPopulater, inputDefinition, metaStreamEvent, nextProcessor, siddhiQueryContext, stateHolder, streamEventClonerHolder
Constructor and Description |
---|
TableWindowProcessor(Table table) |
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
StreamEvent |
find(StateEvent matchingEvent,
CompiledCondition compiledCondition)
To find events from the processor event pool, that the matches the matchingEvent based on finder logic.
|
Table |
getTable() |
String |
getTableId() |
protected StateFactory |
init(ExpressionExecutor[] attributeExpressionExecutors,
ConfigReader configReader,
StreamEventClonerHolder streamEventClonerHolder,
boolean outputExpectsExpiredEvents,
boolean findToBeExecuted,
SiddhiQueryContext siddhiQueryContext)
The init method of the WindowProcessor, this method will be called before other methods
|
boolean |
isOptimisableLookup() |
protected void |
process(ComplexEventChunk streamEventChunk,
Processor nextProcessor,
StreamEventCloner streamEventCloner,
State state)
The main processing method that will be called upon event arrival
|
StreamEvent |
query(StateEvent matchingEvent,
CompiledCondition compiledCondition,
CompiledSelection compiledSelection)
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.
|
StreamEvent |
query(StateEvent matchingEvent,
CompiledCondition compiledCondition,
CompiledSelection compiledSelection,
io.siddhi.query.api.definition.Attribute[] outputAttributes)
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.
|
void |
start()
This will be called only once and this can be used to acquire
required resources for the processing element.
|
void |
stop()
This will be called only once and this can be used to release
the acquired resources for processing.
|
getProcessingMode, init, processEventChunk
getReturnAttributes
constructStreamEventPopulater, getNextProcessor, initProcessor, isStateful, process, process, setNextProcessor, setStreamEventCloner, setToLast
public TableWindowProcessor(Table table)
public boolean isOptimisableLookup()
protected StateFactory init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, StreamEventClonerHolder streamEventClonerHolder, boolean outputExpectsExpiredEvents, boolean findToBeExecuted, SiddhiQueryContext siddhiQueryContext)
BatchingWindowProcessor
init
in class BatchingWindowProcessor
attributeExpressionExecutors
- the executors of each function parametersconfigReader
- the config reader of windowstreamEventClonerHolder
- stream event cloner holderoutputExpectsExpiredEvents
- is expired events sent as outputfindToBeExecuted
- find operation will be performedsiddhiQueryContext
- the context of the siddhi queryprotected void process(ComplexEventChunk streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, State state)
BatchingWindowProcessor
process
in class BatchingWindowProcessor
streamEventChunk
- the stream event chunk that need to be processednextProcessor
- the next processor to which the success events need to be passedstreamEventCloner
- helps to clone the incoming event for local storage or modificationstate
- current state of the processorpublic StreamEvent find(StateEvent matchingEvent, CompiledCondition compiledCondition)
FindableProcessor
find
in interface FindableProcessor
matchingEvent
- the event to be matched with the events at the processorcompiledCondition
- the execution element responsible for matching the corresponding events that matches
the matchingEvent based on pool of events at Processorpublic CompiledCondition compileCondition(io.siddhi.query.api.expression.Expression condition, MatchingMetaInfoHolder matchingMetaInfoHolder, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String,Table> tableMap, SiddhiQueryContext siddhiQueryContext)
FindableProcessor
compileCondition
in interface FindableProcessor
condition
- the matching conditionmatchingMetaInfoHolder
- the meta structure of the incoming matchingEventvariableExpressionExecutors
- the list of variable ExpressionExecutors already createdtableMap
- map of event tablessiddhiQueryContext
- current siddhi query contextpublic void start()
ExternalReferencedHolder
start
in interface ExternalReferencedHolder
public void stop()
ExternalReferencedHolder
stop
in interface ExternalReferencedHolder
public StreamEvent query(StateEvent matchingEvent, CompiledCondition compiledCondition, CompiledSelection compiledSelection, io.siddhi.query.api.definition.Attribute[] outputAttributes) throws ConnectionUnavailableException
QueryableProcessor
query
in interface QueryableProcessor
matchingEvent
- the event to be matched with the events at the processorcompiledCondition
- the execution element responsible for matching the corresponding events that matches
the matchingEvent based on pool of events at ProcessorcompiledSelection
- the execution element responsible for transforming the corresponding events to the
given selectionoutputAttributes
- the output attributes specified in the query.ConnectionUnavailableException
public StreamEvent query(StateEvent matchingEvent, CompiledCondition compiledCondition, CompiledSelection compiledSelection) throws ConnectionUnavailableException
QueryableProcessor
query
in interface QueryableProcessor
matchingEvent
- the event to be matched with the events at the processorcompiledCondition
- the execution element responsible for matching the corresponding events that matches
the matchingEvent based on pool of events at ProcessorcompiledSelection
- the execution element responsible for transforming the corresponding events to the
given selectionConnectionUnavailableException
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)
QueryableProcessor
compileSelection
in interface QueryableProcessor
selector
- the query selectormatchingMetaInfoHolder
- the meta structure of the incoming matchingEventvariableExpressionExecutors
- the list of variable ExpressionExecutors already createdtableMap
- map of event tablessiddhiQueryContext
- current siddhi query contextpublic Table getTable()
public String getTableId()
Copyright © 2021. All rights reserved.