public abstract class AbstractStreamProcessor extends Object implements Processor, EternalReferencedHolder, Snapshotable
| Modifier and Type | Field and Description |
|---|---|
protected List<org.wso2.siddhi.query.api.definition.Attribute> |
additionalAttributes |
protected ExpressionExecutor[] |
attributeExpressionExecutors |
protected int |
attributeExpressionLength |
protected ComplexEventPopulater |
complexEventPopulater |
protected String |
elementId |
protected ExecutionPlanContext |
executionPlanContext |
protected org.wso2.siddhi.query.api.definition.AbstractDefinition |
inputDefinition |
protected static org.apache.log4j.Logger |
log |
protected Processor |
nextProcessor |
protected String |
queryName |
protected StreamEventCloner |
streamEventCloner |
| Constructor and Description |
|---|
AbstractStreamProcessor() |
| Modifier and Type | Method and Description |
|---|---|
Processor |
cloneProcessor(String key)
Clone a copy of processor
|
void |
constructStreamEventPopulater(MetaStreamEvent metaStreamEvent,
int streamEventChainIndex) |
String |
getElementId() |
Processor |
getNextProcessor()
Get next processor element in the processor chain.
|
protected abstract List<org.wso2.siddhi.query.api.definition.Attribute> |
init(org.wso2.siddhi.query.api.definition.AbstractDefinition inputDefinition,
ExpressionExecutor[] attributeExpressionExecutors,
ExecutionPlanContext executionPlanContext,
boolean outputExpectsExpiredEvents)
The init method of the StreamProcessor, this method will be called before other methods
|
org.wso2.siddhi.query.api.definition.AbstractDefinition |
initProcessor(org.wso2.siddhi.query.api.definition.AbstractDefinition inputDefinition,
ExpressionExecutor[] attributeExpressionExecutors,
ExecutionPlanContext executionPlanContext,
boolean outputExpectsExpiredEvents,
String queryName) |
void |
process(ComplexEventChunk streamEventChunk)
Process the handed StreamEvent
|
protected abstract void |
processEventChunk(ComplexEventChunk<StreamEvent> streamEventChunk,
Processor nextProcessor,
StreamEventCloner streamEventCloner,
ComplexEventPopulater complexEventPopulater)
The main processing method that will be called upon event arrival
|
void |
setNextProcessor(Processor processor)
Set next processor element in processor chain
|
void |
setStreamEventCloner(StreamEventCloner streamEventCloner) |
void |
setToLast(Processor processor)
Set as the last element of the processor chain
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstart, stopcurrentState, restoreStateprotected static final org.apache.log4j.Logger log
protected Processor nextProcessor
protected List<org.wso2.siddhi.query.api.definition.Attribute> additionalAttributes
protected StreamEventCloner streamEventCloner
protected org.wso2.siddhi.query.api.definition.AbstractDefinition inputDefinition
protected ExpressionExecutor[] attributeExpressionExecutors
protected ExecutionPlanContext executionPlanContext
protected int attributeExpressionLength
protected ComplexEventPopulater complexEventPopulater
protected String elementId
protected String queryName
public org.wso2.siddhi.query.api.definition.AbstractDefinition initProcessor(org.wso2.siddhi.query.api.definition.AbstractDefinition inputDefinition,
ExpressionExecutor[] attributeExpressionExecutors,
ExecutionPlanContext executionPlanContext,
boolean outputExpectsExpiredEvents,
String queryName)
protected abstract List<org.wso2.siddhi.query.api.definition.Attribute> init(org.wso2.siddhi.query.api.definition.AbstractDefinition inputDefinition, ExpressionExecutor[] attributeExpressionExecutors, ExecutionPlanContext executionPlanContext, boolean outputExpectsExpiredEvents)
inputDefinition - the incoming stream definitionattributeExpressionExecutors - the executors of each function parametersexecutionPlanContext - the context of the execution planoutputExpectsExpiredEvents - is output expects ExpiredEventspublic void process(ComplexEventChunk streamEventChunk)
Processorprotected abstract void processEventChunk(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater)
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 attributespublic void setNextProcessor(Processor processor)
ProcessorsetNextProcessor in interface Processorprocessor - Processor to be set as next element of processor chainpublic Processor getNextProcessor()
ProcessorgetNextProcessor in interface Processorpublic Processor cloneProcessor(String key)
ProcessorcloneProcessor in interface Processorkey - partition keypublic void constructStreamEventPopulater(MetaStreamEvent metaStreamEvent, int streamEventChainIndex)
public void setStreamEventCloner(StreamEventCloner streamEventCloner)
public void setToLast(Processor processor)
Processorpublic String getElementId()
getElementId in interface SnapshotableCopyright © 2018 WSO2. All Rights Reserved.