public class UniqueTimeWindowProcessor
extends org.wso2.siddhi.core.query.processor.stream.window.WindowProcessor
implements org.wso2.siddhi.core.query.processor.SchedulingProcessor, org.wso2.siddhi.core.query.processor.stream.window.FindableProcessor
| Constructor and Description |
|---|
UniqueTimeWindowProcessor() |
| Modifier and Type | Method and Description |
|---|---|
org.wso2.siddhi.core.util.collection.operator.Finder |
constructFinder(org.wso2.siddhi.query.api.expression.Expression expression,
org.wso2.siddhi.core.util.collection.operator.MatchingMetaStateHolder matchingMetaStateHolder,
org.wso2.siddhi.core.config.ExecutionPlanContext executionPlanContext,
List<org.wso2.siddhi.core.executor.VariableExpressionExecutor> variableExpressionExecutors,
Map<String,org.wso2.siddhi.core.table.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
|
org.wso2.siddhi.core.event.stream.StreamEvent |
find(org.wso2.siddhi.core.event.state.StateEvent matchingEvent,
org.wso2.siddhi.core.util.collection.operator.Finder finder)
To find events from the processor event pool, that the matches the matchingEvent based on finder logic.
|
org.wso2.siddhi.core.util.Scheduler |
getScheduler()
The getScheduler method of the TimeWindowProcessor, As scheduler is private variable, to access publicly we
use this getter method.
|
protected void |
init(org.wso2.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors,
org.wso2.siddhi.core.config.ExecutionPlanContext executionPlanContext)
The init method of the WindowProcessor, this method will be called before other methods
|
protected void |
process(org.wso2.siddhi.core.event.ComplexEventChunk<org.wso2.siddhi.core.event.stream.StreamEvent> streamEventChunk,
org.wso2.siddhi.core.query.processor.Processor nextProcessor,
org.wso2.siddhi.core.event.stream.StreamEventCloner streamEventCloner)
The main processing method that will be called upon event arrival
|
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(org.wso2.siddhi.core.util.Scheduler scheduler)
The setScheduler method of the TimeWindowProcessor, As scheduler is private variable, to access publicly we
use this setter method.
|
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, setToLastpublic void setScheduler(org.wso2.siddhi.core.util.Scheduler scheduler)
setScheduler in interface org.wso2.siddhi.core.query.processor.SchedulingProcessorscheduler - the value of scheduler.public org.wso2.siddhi.core.util.Scheduler getScheduler()
getScheduler in interface org.wso2.siddhi.core.query.processor.SchedulingProcessorprotected void init(org.wso2.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors,
org.wso2.siddhi.core.config.ExecutionPlanContext executionPlanContext)
init in class org.wso2.siddhi.core.query.processor.stream.window.WindowProcessorattributeExpressionExecutors - the executors of each function parametersexecutionPlanContext - the context of the execution planprotected void process(org.wso2.siddhi.core.event.ComplexEventChunk<org.wso2.siddhi.core.event.stream.StreamEvent> streamEventChunk,
org.wso2.siddhi.core.query.processor.Processor nextProcessor,
org.wso2.siddhi.core.event.stream.StreamEventCloner streamEventCloner)
process in class org.wso2.siddhi.core.query.processor.stream.window.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 org.wso2.siddhi.core.event.stream.StreamEvent find(org.wso2.siddhi.core.event.state.StateEvent matchingEvent,
org.wso2.siddhi.core.util.collection.operator.Finder finder)
find in interface org.wso2.siddhi.core.query.processor.stream.window.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 org.wso2.siddhi.core.util.collection.operator.Finder constructFinder(org.wso2.siddhi.query.api.expression.Expression expression,
org.wso2.siddhi.core.util.collection.operator.MatchingMetaStateHolder matchingMetaStateHolder,
org.wso2.siddhi.core.config.ExecutionPlanContext executionPlanContext,
List<org.wso2.siddhi.core.executor.VariableExpressionExecutor> variableExpressionExecutors,
Map<String,org.wso2.siddhi.core.table.EventTable> eventTableMap)
constructFinder in interface org.wso2.siddhi.core.query.processor.stream.window.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 tablespublic void start()
start in interface org.wso2.siddhi.core.util.extension.holder.EternalReferencedHolderpublic void stop()
stop in interface org.wso2.siddhi.core.util.extension.holder.EternalReferencedHolderpublic Object[] currentState()
currentState in interface org.wso2.siddhi.core.util.snapshot.Snapshotablepublic void restoreState(Object[] state)
restoreState in interface org.wso2.siddhi.core.util.snapshot.Snapshotablestate - the stateful objects of the element as an array on
the same order provided by currentState().Copyright © 2017 WSO2. All rights reserved.