Class HopingWindowProcessor<S extends State>
- java.lang.Object
-
- io.siddhi.core.query.processor.stream.AbstractStreamProcessor<S>
-
- io.siddhi.core.query.processor.stream.window.WindowProcessor<S>
-
- io.siddhi.core.query.processor.stream.window.HopingWindowProcessor<S>
-
- Type Parameters:
S- current state of the processor
- All Implemented Interfaces:
Processor,ExternalReferencedHolder
public abstract class HopingWindowProcessor<S extends State> extends WindowProcessor<S>
Performs event processing in a hopping manner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classHopingWindowProcessor.HopingTimestampPopulatorPopulates hopping timestamp to the complex event
-
Field Summary
Fields Modifier and Type Field Description protected HopingWindowProcessor.HopingTimestampPopulatorhopingTimestampPopulatorprotected List<io.siddhi.query.api.definition.Attribute>internalAttributes-
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 HopingWindowProcessor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidconstructStreamEventPopulater(MetaStreamEvent metaStreamEvent, int streamEventChainIndex)ProcessingModegetProcessingMode()Defines the behaviour of the processing, will be called after the initprotected StateFactory<S>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 methodsprotected abstract StateFactory<S>init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, boolean outputExpectsExpiredEvents, SiddhiQueryContext siddhiQueryContext)The init method of the WindowProcessor, this method will be called before other methodsprotected voidprocessEventChunk(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater, S state)The main processing method that will be called upon event arrivalprotected abstract voidprocessEventChunk(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, HopingWindowProcessor.HopingTimestampPopulator hopingTimestampPopulator)The main processing method that will be called upon event arrival-
Methods inherited from class io.siddhi.core.query.processor.stream.window.WindowProcessor
getReturnAttributes
-
Methods inherited from class io.siddhi.core.query.processor.stream.AbstractStreamProcessor
getNextProcessor, initProcessor, isStateful, process, process, setNextProcessor, setStreamEventCloner, setToLast
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.siddhi.core.util.extension.holder.ExternalReferencedHolder
start, stop
-
-
-
-
Field Detail
-
internalAttributes
protected List<io.siddhi.query.api.definition.Attribute> internalAttributes
-
hopingTimestampPopulator
protected HopingWindowProcessor.HopingTimestampPopulator hopingTimestampPopulator
-
-
Method Detail
-
init
protected StateFactory<S> 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<S extends State>- 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
-
init
protected abstract StateFactory<S> init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, boolean outputExpectsExpiredEvents, SiddhiQueryContext siddhiQueryContext)
The init method of the WindowProcessor, this method will be called before other methods- Parameters:
attributeExpressionExecutors- the executors of each function parametersconfigReader- the config reader of windowoutputExpectsExpiredEvents- is expired events sent as outputsiddhiQueryContext- the context of the siddhi query
-
processEventChunk
protected void processEventChunk(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater, S state)
Description copied from class:AbstractStreamProcessorThe main processing method that will be called upon event arrival- Specified by:
processEventChunkin classAbstractStreamProcessor<S extends State>- 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
-
processEventChunk
protected abstract void processEventChunk(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, HopingWindowProcessor.HopingTimestampPopulator hopingTimestampPopulator)
The main processing method that will be called upon event arrival- 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 modificationhopingTimestampPopulator- helps to populate the events with the hoping timestamp
-
constructStreamEventPopulater
public void constructStreamEventPopulater(MetaStreamEvent metaStreamEvent, int streamEventChainIndex)
- Overrides:
constructStreamEventPopulaterin classAbstractStreamProcessor<S extends State>
-
getProcessingMode
public ProcessingMode getProcessingMode()
Description copied from class:AbstractStreamProcessorDefines the behaviour of the processing, will be called after the init- Specified by:
getProcessingModein classAbstractStreamProcessor<S extends State>- Returns:
- ProcessingMode processing mode of the processor
-
-