Class StreamFunctionProcessor<S extends State>
- java.lang.Object
-
- io.siddhi.core.query.processor.stream.AbstractStreamProcessor<S>
-
- io.siddhi.core.query.processor.stream.function.StreamFunctionProcessor<S>
-
- Type Parameters:
S- current state of the processor
- All Implemented Interfaces:
Processor,ExternalReferencedHolder
- Direct Known Subclasses:
Pol2CartStreamFunctionProcessor
public abstract class StreamFunctionProcessor<S extends State> extends AbstractStreamProcessor<S>
Stream Processor to handle Stream Functions.
-
-
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 StreamFunctionProcessor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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(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 methodsprotected abstract Object[]process(Object data)The process method of the StreamFunction, used when zero or one function parameter is providedprotected abstract Object[]process(Object[] data)The process method of the StreamFunction, used when more then one function parameters are providedprotected voidprocessEventChunk(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater, S state)The main processing method that will be called upon event arrival-
Methods inherited from class io.siddhi.core.query.processor.stream.AbstractStreamProcessor
constructStreamEventPopulater, getNextProcessor, getReturnAttributes, 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
-
-
-
-
Method Detail
-
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
-
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
-
process
protected abstract Object[] process(Object[] data)
The process method of the StreamFunction, used when more then one function parameters are provided- Parameters:
data- the data values for the function parameters- Returns:
- the data for additional output attributes introduced by the function
-
process
protected abstract Object[] process(Object data)
The process method of the StreamFunction, used when zero or one function parameter is provided- Parameters:
data- null if the function parameter count is zero or runtime data value of the function parameter- Returns:
- the data for additional output attribute introduced by the function
-
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)
The 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 theStreamFunctionProcessorextensions configurationstreamEventClonerHolder- stream event cloner HolderoutputExpectsExpiredEvents- is expired events sent as outputfindToBeExecuted- find operation will be performedsiddhiQueryContext- siddhi query context
-
init
protected abstract StateFactory<S> init(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- Parameters:
inputDefinition- the incoming stream definitionattributeExpressionExecutors- the executors of each function parametersconfigReader- this hold theStreamFunctionProcessorextensions configuration reader.outputExpectsExpiredEvents- is expired events sent as outputsiddhiQueryContext- the context of the siddhi query- Returns:
- the additional output attributes introduced by the function
-
-