Class LogStreamProcessor
- java.lang.Object
-
- io.siddhi.core.query.processor.stream.AbstractStreamProcessor<S>
-
- io.siddhi.core.query.processor.stream.StreamProcessor<State>
-
- io.siddhi.core.query.processor.stream.LogStreamProcessor
-
- All Implemented Interfaces:
Processor,ExternalReferencedHolder
public class LogStreamProcessor extends StreamProcessor<State>
Input attributes to log is (priority (String), log.message (String), is.event.logged (Bool))
-
-
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 LogStreamProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessingModegetProcessingMode()Defines the behaviour of the processing, will be called after the initList<io.siddhi.query.api.definition.Attribute>getReturnAttributes()protected 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 StreamFunctionprotected voidprocess(ComplexEventChunk<StreamEvent> 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.StreamProcessor
processEventChunk
-
Methods inherited from class io.siddhi.core.query.processor.stream.AbstractStreamProcessor
constructStreamEventPopulater, getNextProcessor, initProcessor, isStateful, process, process, setNextProcessor, setStreamEventCloner, setToLast
-
-
-
-
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)
The init method of the StreamFunction- Specified by:
initin classAbstractStreamProcessor<State>- Parameters:
metaStreamEvent- the stream event metainputDefinition- the incoming stream definitionattributeExpressionExecutors- the executors for the function parametersconfigReader- this hold theLogStreamProcessorconfiguration reader.streamEventClonerHolder- streamEventCloner HolderfindToBeExecuted- find will be executedsiddhiQueryContext- current siddhi query contextoutputExpectsExpiredEvents- is expired events sent as output- Returns:
- the additional output attributes introduced by the function
-
getReturnAttributes
public List<io.siddhi.query.api.definition.Attribute> getReturnAttributes()
- Specified by:
getReturnAttributesin classAbstractStreamProcessor<State>
-
process
protected void process(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater, State state)
Description copied from class:StreamProcessorThe main processing method that will be called upon event arrival- Specified by:
processin classStreamProcessor<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 processor state
-
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.
-
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.
-
getProcessingMode
public ProcessingMode getProcessingMode()
Description copied from class:AbstractStreamProcessorDefines the behaviour of the processing, will be called after the init- Specified by:
getProcessingModein classAbstractStreamProcessor<State>- Returns:
- ProcessingMode processing mode of the processor
-
-