public class ExternalTimeBatchWindowProcessor extends BatchingFindableWindowProcessor<io.siddhi.core.query.processor.stream.window.ExternalTimeBatchWindowProcessor.WindowState> implements SchedulingProcessor
WindowProcessor
which represent a Batch Window operating based on external time.attributeExpressionExecutors, attributeExpressionLength, complexEventPopulater, inputDefinition, metaStreamEvent, nextProcessor, siddhiQueryContext, stateHolder, streamEventClonerHolder
Constructor and Description |
---|
ExternalTimeBatchWindowProcessor() |
Modifier and Type | Method and Description |
---|---|
CompiledCondition |
compileCondition(io.siddhi.query.api.expression.Expression condition,
MatchingMetaInfoHolder matchingMetaInfoHolder,
List<VariableExpressionExecutor> variableExpressionExecutors,
Map<String,Table> tableMap,
io.siddhi.core.query.processor.stream.window.ExternalTimeBatchWindowProcessor.WindowState state,
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.
|
StreamEvent |
find(StateEvent matchingEvent,
CompiledCondition compiledCondition,
StreamEventCloner streamEventCloner,
io.siddhi.core.query.processor.stream.window.ExternalTimeBatchWindowProcessor.WindowState state)
To find events from the processor event pool, that the matches the matchingEvent based on finder logic.
|
Scheduler |
getScheduler() |
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
|
protected void |
process(ComplexEventChunk<StreamEvent> streamEventChunk,
Processor nextProcessor,
StreamEventCloner streamEventCloner,
io.siddhi.core.query.processor.stream.window.ExternalTimeBatchWindowProcessor.WindowState state)
Here an assumption is taken:
Parameter: timestamp: The time which the window determines as current time and will act upon,
the value of this parameter should be monotonically increasing.
|
void |
setScheduler(Scheduler scheduler) |
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.
|
compileCondition, find
getProcessingMode, init, processEventChunk
getReturnAttributes
constructStreamEventPopulater, getNextProcessor, initProcessor, process, setNextProcessor, setStreamEventCloner, setToLast
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNextProcessor, process, setNextProcessor, setToLast
protected StateFactory init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, StreamEventClonerHolder streamEventClonerHolder, boolean outputExpectsExpiredEvents, boolean findToBeExecuted, SiddhiQueryContext siddhiQueryContext)
BatchingWindowProcessor
init
in class BatchingWindowProcessor<io.siddhi.core.query.processor.stream.window.ExternalTimeBatchWindowProcessor.WindowState>
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<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, io.siddhi.core.query.processor.stream.window.ExternalTimeBatchWindowProcessor.WindowState state)
process
in class BatchingWindowProcessor<io.siddhi.core.query.processor.stream.window.ExternalTimeBatchWindowProcessor.WindowState>
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 void start()
ExternalReferencedHolder
start
in interface ExternalReferencedHolder
public void stop()
ExternalReferencedHolder
stop
in interface ExternalReferencedHolder
public CompiledCondition compileCondition(io.siddhi.query.api.expression.Expression condition, MatchingMetaInfoHolder matchingMetaInfoHolder, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String,Table> tableMap, io.siddhi.core.query.processor.stream.window.ExternalTimeBatchWindowProcessor.WindowState state, SiddhiQueryContext siddhiQueryContext)
BatchingFindableWindowProcessor
compileCondition
in class BatchingFindableWindowProcessor<io.siddhi.core.query.processor.stream.window.ExternalTimeBatchWindowProcessor.WindowState>
condition
- the matching conditionmatchingMetaInfoHolder
- the meta structure of the incoming matchingEventvariableExpressionExecutors
- the list of variable ExpressionExecutors already createdtableMap
- map of event tablesstate
- current query statesiddhiQueryContext
- current siddhi query contextpublic StreamEvent find(StateEvent matchingEvent, CompiledCondition compiledCondition, StreamEventCloner streamEventCloner, io.siddhi.core.query.processor.stream.window.ExternalTimeBatchWindowProcessor.WindowState state)
BatchingFindableWindowProcessor
find
in class BatchingFindableWindowProcessor<io.siddhi.core.query.processor.stream.window.ExternalTimeBatchWindowProcessor.WindowState>
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 ProcessorstreamEventCloner
- stream event clonerstate
- current query state @return the matched eventspublic Scheduler getScheduler()
getScheduler
in interface SchedulingProcessor
public void setScheduler(Scheduler scheduler)
setScheduler
in interface SchedulingProcessor
Copyright © 2019. All rights reserved.