public class UniqueExternalTimeBatchWindowProcessor extends WindowProcessor implements SchedulingProcessor, FindableProcessor
outputExpectsExpiredEventsadditionalAttributes, attributeExpressionExecutors, attributeExpressionLength, complexEventPopulater, elementId, executionPlanContext, inputDefinition, log, nextProcessor, queryName, streamEventCloner| Constructor and Description |
|---|
UniqueExternalTimeBatchWindowProcessor() |
| Modifier and Type | Method and Description |
|---|---|
Finder |
constructFinder(org.wso2.siddhi.query.api.expression.Expression expression,
MatchingMetaStateHolder matchingMetaStateHolder,
ExecutionPlanContext executionPlanContext,
List<VariableExpressionExecutor> variableExpressionExecutors,
Map<String,EventTable> eventTableMap)
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.
|
Object[] |
currentState()
Used to collect the serializable state of the processing element, that need to be
persisted for the reconstructing the element to the same state on a different point of time
|
StreamEvent |
find(StateEvent matchingEvent,
Finder finder)
To find events from the processor event pool, that the matches the matchingEvent based on finder logic.
|
Scheduler |
getScheduler() |
protected void |
init(ExpressionExecutor[] attributeExpressionExecutors,
ExecutionPlanContext executionPlanContext)
The init method of the WindowProcessor, this method will be called before other methods
|
protected void |
process(ComplexEventChunk<StreamEvent> streamEventChunk,
Processor nextProcessor,
StreamEventCloner streamEventCloner)
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 |
restoreState(Object[] state)
Used to restore serialized state of the processing element, for reconstructing
the element to the same state as if was on a previous point of time.
|
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.
|
init, processEventChunkcloneProcessor, constructStreamEventPopulater, getElementId, getNextProcessor, initProcessor, process, setNextProcessor, setStreamEventCloner, setToLastclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloneProcessor, getNextProcessor, process, setNextProcessor, setToLastpublic UniqueExternalTimeBatchWindowProcessor()
protected void init(ExpressionExecutor[] attributeExpressionExecutors, ExecutionPlanContext executionPlanContext)
WindowProcessorinit in class WindowProcessorattributeExpressionExecutors - the executors of each function parametersexecutionPlanContext - the context of the execution planprotected void process(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner)
process in class WindowProcessorstreamEventChunk - 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 modificationpublic void start()
EternalReferencedHolderstart in interface EternalReferencedHolderpublic void stop()
EternalReferencedHolderstop in interface EternalReferencedHolderpublic Object[] currentState()
SnapshotablecurrentState in interface Snapshotablepublic void restoreState(Object[] state)
SnapshotablerestoreState in interface Snapshotablestate - the stateful objects of the element as an array on
the same order provided by currentState().public void setScheduler(Scheduler scheduler)
setScheduler in interface SchedulingProcessorpublic Scheduler getScheduler()
getScheduler in interface SchedulingProcessorpublic StreamEvent find(StateEvent matchingEvent, Finder finder)
FindableProcessorfind in interface FindableProcessormatchingEvent - the event to be matched with the events at the processorfinder - the execution element responsible for finding the corresponding events that matches
the matchingEvent based on pool of events at Processorpublic Finder constructFinder(org.wso2.siddhi.query.api.expression.Expression expression, MatchingMetaStateHolder matchingMetaStateHolder, ExecutionPlanContext executionPlanContext, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String,EventTable> eventTableMap)
FindableProcessorconstructFinder in interface FindableProcessorexpression - the matching expressionmatchingMetaStateHolder - the meta structure of the incoming matchingEventexecutionPlanContext - current execution plan contextvariableExpressionExecutors - the list of variable ExpressionExecutors already createdeventTableMap - map of event tablesCopyright © 2018 WSO2. All Rights Reserved.