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.attributeExpressionExecutors, attributeExpressionLength, complexEventPopulater, inputDefinition, metaStreamEvent, nextProcessor, siddhiQueryContext, stateHolder, streamEventClonerHolder
Constructor and Description |
---|
WindowWindowProcessor(Window window) |
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.
|
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 StateFactory |
init(MetaStreamEvent metaStreamEvent,
io.siddhi.query.api.definition.AbstractDefinition inputDefinition,
ExpressionExecutor[] attributeExpressionExecutors,
ConfigReader configReader,
StreamEventClonerHolder streamEventClonerHolder,
boolean outputExpectsExpiredEvents,
boolean findToBeExecuted,
SiddhiQueryContext siddhiQueryContext)
The init method of the StreamProcessor, this method will be called before other methods
|
protected void |
processEventChunk(ComplexEventChunk streamEventChunk,
Processor nextProcessor,
StreamEventCloner streamEventCloner,
ComplexEventPopulater complexEventPopulater,
State state)
The main processing method that will be called upon event arrival
|
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.
|
getReturnAttributes
constructStreamEventPopulater, getNextProcessor, initProcessor, isStateful, process, process, setNextProcessor, setStreamEventCloner, setToLast
public WindowWindowProcessor(Window window)
protected StateFactory init(MetaStreamEvent metaStreamEvent, io.siddhi.query.api.definition.AbstractDefinition inputDefinition, ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, StreamEventClonerHolder streamEventClonerHolder, boolean outputExpectsExpiredEvents, boolean findToBeExecuted, SiddhiQueryContext siddhiQueryContext)
AbstractStreamProcessor
init
in class AbstractStreamProcessor
metaStreamEvent
- the stream event metainputDefinition
- the incoming stream definitionattributeExpressionExecutors
- the executors of each function parametersconfigReader
- this hold the AbstractStreamProcessor
extensions configurationstreamEventClonerHolder
- stream event cloner holderoutputExpectsExpiredEvents
- is expired events sent as outputfindToBeExecuted
- find will be executedsiddhiQueryContext
- current siddhi query contextprotected void processEventChunk(ComplexEventChunk streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater, State state)
AbstractStreamProcessor
processEventChunk
in class AbstractStreamProcessor
streamEventChunk
- 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 attributesstate
- 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 ProcessingMode getProcessingMode()
AbstractStreamProcessor
getProcessingMode
in class AbstractStreamProcessor
Copyright © 2019. All rights reserved.