Class WindowWindowProcessor
- java.lang.Object
-
- io.siddhi.core.query.processor.stream.AbstractStreamProcessor<S>
-
- io.siddhi.core.query.processor.stream.window.WindowProcessor
-
- io.siddhi.core.query.processor.stream.window.WindowWindowProcessor
-
- All Implemented Interfaces:
Processor,FindableProcessor,ExternalReferencedHolder
public class WindowWindowProcessor extends WindowProcessor implements FindableProcessor
This is theWindowProcessorintended to be used with window join queries. This processor keeps a reference of theWindowand directly find the items from theWindow. The process method just passes the events to the nextJoinProcessorinorder to handle the events there.
-
-
Field Summary
-
Fields inherited from class io.siddhi.core.query.processor.stream.AbstractStreamProcessor
attributeExpressionExecutors, attributeExpressionLength, complexEventPopulater, inputDefinition, metaStreamEvent, nextProcessor, siddhiQueryContext, stateHolder, streamEventClonerHolder
-
-
Constructor Summary
Constructors Constructor Description WindowWindowProcessor(Window window)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompiledConditioncompileCondition(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.StreamEventfind(StateEvent matchingEvent, CompiledCondition compiledCondition)To find events from the processor event pool, that the matches the matchingEvent based on finder logic.ProcessingModegetProcessingMode()Defines the behaviour of the processing, will be called after the initprotected StateFactoryinit(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 methodsprotected voidprocessEventChunk(ComplexEventChunk streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater, State state)The main processing method that will be called upon event arrivalvoidstart()This will be called only once and this can be used to acquire required resources for the processing element.voidstop()This will be called only once and this can be used to release the acquired resources for processing.-
Methods inherited from class io.siddhi.core.query.processor.stream.window.WindowProcessor
getReturnAttributes
-
Methods inherited from class io.siddhi.core.query.processor.stream.AbstractStreamProcessor
constructStreamEventPopulater, getNextProcessor, initProcessor, isStateful, process, process, setNextProcessor, setStreamEventCloner, setToLast
-
-
-
-
Constructor Detail
-
WindowWindowProcessor
public WindowWindowProcessor(Window window)
-
-
Method Detail
-
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)
Description copied from class:AbstractStreamProcessorThe init method of the StreamProcessor, this method will be called before other methods- Specified by:
initin classAbstractStreamProcessor- Parameters:
metaStreamEvent- the stream event metainputDefinition- the incoming stream definitionattributeExpressionExecutors- the executors of each function parametersconfigReader- this hold theAbstractStreamProcessorextensions configurationstreamEventClonerHolder- stream event cloner holderoutputExpectsExpiredEvents- is expired events sent as outputfindToBeExecuted- find will be executedsiddhiQueryContext- current siddhi query context
-
processEventChunk
protected void processEventChunk(ComplexEventChunk streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater, State state)
Description copied from class:AbstractStreamProcessorThe main processing method that will be called upon event arrival- Specified by:
processEventChunkin classAbstractStreamProcessor- Parameters:
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 processor
-
find
public StreamEvent find(StateEvent matchingEvent, CompiledCondition compiledCondition)
Description copied from interface:FindableProcessorTo find events from the processor event pool, that the matches the matchingEvent based on finder logic.- Specified by:
findin interfaceFindableProcessor- Parameters:
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 Processor- Returns:
- the matched events
-
compileCondition
public CompiledCondition compileCondition(io.siddhi.query.api.expression.Expression condition, MatchingMetaInfoHolder matchingMetaInfoHolder, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String,Table> tableMap, SiddhiQueryContext siddhiQueryContext)
Description copied from interface:FindableProcessorTo construct a finder having the capability of finding events at the processor that corresponds to the incoming matchingEvent and the given matching expression logic.- Specified by:
compileConditionin interfaceFindableProcessor- Parameters:
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 context- Returns:
- compiled Condition having the capability of matching events against the incoming matchingEvent
-
start
public void start()
Description copied from interface:ExternalReferencedHolderThis will be called only once and this can be used to acquire required resources for the processing element. This will be called after initializing the system and before starting to process the events.- Specified by:
startin interfaceExternalReferencedHolder
-
stop
public void stop()
Description copied from interface:ExternalReferencedHolderThis will be called only once and this can be used to release the acquired resources for processing. This will be called before shutting down the system.- Specified by:
stopin interfaceExternalReferencedHolder
-
getProcessingMode
public ProcessingMode getProcessingMode()
Description copied from class:AbstractStreamProcessorDefines the behaviour of the processing, will be called after the init- Specified by:
getProcessingModein classAbstractStreamProcessor- Returns:
- ProcessingMode processing mode of the processor
-
-