public class WindowWindowProcessor extends WindowProcessor implements FindableProcessor
WindowProcessor intended to be used with window join queries.
This processor keeps a reference of the Window and directly find
the items from the Window.
The process method just passes the events to the next
JoinProcessor inorder to handle
the events there.additionalAttributes, attributeExpressionExecutors, attributeExpressionLength, complexEventPopulater, elementId, inputDefinition, metaStreamEvent, nextProcessor, siddhiQueryContext, streamEventCloner, streamEventClonerHolder| Constructor and Description |
|---|
WindowWindowProcessor(Window window) |
| Modifier and Type | Method and Description |
|---|---|
Processor |
cloneProcessor(String key)
Clone a copy of processor
|
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.
|
Map<String,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,
CompiledCondition compiledCondition)
To find events from the processor event pool, that the matches the matchingEvent based on finder logic.
|
ProcessingMode |
getProcessingMode()
Defines the behaviour of the processing, will be called after the init
|
protected List<io.siddhi.query.api.definition.Attribute> |
init(MetaStreamEvent metaStreamEvent,
io.siddhi.query.api.definition.AbstractDefinition inputDefinition,
ExpressionExecutor[] attributeExpressionExecutors,
ConfigReader configReader,
boolean outputExpectsExpiredEvents,
SiddhiQueryContext siddhiQueryContext)
The init method of the StreamProcessor, this method will be called before other methods
|
protected void |
processEventChunk(ComplexEventChunk<StreamEvent> streamEventChunk,
Processor nextProcessor,
StreamEventCloner streamEventCloner,
ComplexEventPopulater complexEventPopulater)
The main processing method that will be called upon event arrival
|
void |
restoreState(Map<String,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 |
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.
|
clean, constructStreamEventPopulater, getElementId, getNextProcessor, initProcessor, process, setNextProcessor, setStreamEventCloner, setToLastpublic WindowWindowProcessor(Window window)
protected List<io.siddhi.query.api.definition.Attribute> init(MetaStreamEvent metaStreamEvent, io.siddhi.query.api.definition.AbstractDefinition inputDefinition, ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, boolean outputExpectsExpiredEvents, SiddhiQueryContext siddhiQueryContext)
AbstractStreamProcessorinit in class AbstractStreamProcessormetaStreamEvent - the stream event metainputDefinition - the incoming stream definitionattributeExpressionExecutors - the executors of each function parametersconfigReader - this hold the AbstractStreamProcessor extensions configuration
reader.outputExpectsExpiredEvents - is expired events sent as outputsiddhiQueryContext - current siddhi query contextprotected void processEventChunk(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater)
AbstractStreamProcessorprocessEventChunk in class AbstractStreamProcessorstreamEventChunk - the 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 modificationcomplexEventPopulater - helps to populate the events with the resultant attributespublic StreamEvent find(StateEvent matchingEvent, CompiledCondition compiledCondition)
FindableProcessorfind in interface FindableProcessormatchingEvent - 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)
FindableProcessorcompileCondition in interface FindableProcessorcondition - 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()
EternalReferencedHolderstart in interface EternalReferencedHolderpublic void stop()
EternalReferencedHolderstop in interface EternalReferencedHolderpublic Processor cloneProcessor(String key)
ProcessorcloneProcessor in interface ProcessorcloneProcessor in class AbstractStreamProcessorkey - partition keypublic ProcessingMode getProcessingMode()
AbstractStreamProcessorgetProcessingMode in class AbstractStreamProcessorpublic Map<String,Object> currentState()
SnapshotablecurrentState in interface Snapshotablepublic void restoreState(Map<String,Object> state)
SnapshotablerestoreState in interface Snapshotablestate - the stateful objects of the element as an array on
the same order provided by currentState().Copyright © 2019. All rights reserved.