public class MinMaxStreamProcessor
extends org.wso2.siddhi.core.query.processor.stream.StreamProcessor
| Constructor and Description |
|---|
MinMaxStreamProcessor() |
| Modifier and Type | Method and Description |
|---|---|
Object[] |
currentState()
Used to collect the serializable state of the processing element, that need to be
persisted to reconstruct the element to the same state on a different point of time
|
protected List<org.wso2.siddhi.query.api.definition.Attribute> |
init(org.wso2.siddhi.query.api.definition.AbstractDefinition inputDefinition,
org.wso2.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors,
org.wso2.siddhi.core.config.ExecutionPlanContext executionPlanContext)
The init method of MinMaxStreamProcessor,
this method will be called before other methods
Input parameters:
1st parameter: variable
2nd parameter: maxPreBound window length
3rd parameter: maxPostBound window length
4th parameter: preBoundChange percentage
5th parameter: postBoundChange percentage
6th parameter: extrema type
Additional output attributes:
extremaType
preBound, postBound: distance from min/max to where the threshold values occur (preBoundChange%, postBoundChange%
values)
|
protected void |
process(org.wso2.siddhi.core.event.ComplexEventChunk<org.wso2.siddhi.core.event.stream.StreamEvent> streamEventChunk,
org.wso2.siddhi.core.query.processor.Processor nextProcessor,
org.wso2.siddhi.core.event.stream.StreamEventCloner streamEventCloner,
org.wso2.siddhi.core.event.stream.populater.ComplexEventPopulater complexEventPopulater)
The main processing method that will be called upon event arrival
|
void |
restoreState(Object[] state)
Used to restore serialized state of the processing element, for reconstructing
the element to the same state as if was on a previous point of time.
|
void |
start()
No resources to acquire.
|
void |
stop()
No resources to release.
|
init, processEventChunkprotected List<org.wso2.siddhi.query.api.definition.Attribute> init(org.wso2.siddhi.query.api.definition.AbstractDefinition inputDefinition, org.wso2.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors, org.wso2.siddhi.core.config.ExecutionPlanContext executionPlanContext)
init in class org.wso2.siddhi.core.query.processor.stream.StreamProcessorinputDefinition - the incoming stream definitionattributeExpressionExecutors - the executors of each function parametersexecutionPlanContext - the context of the execution planprotected void process(org.wso2.siddhi.core.event.ComplexEventChunk<org.wso2.siddhi.core.event.stream.StreamEvent> streamEventChunk,
org.wso2.siddhi.core.query.processor.Processor nextProcessor,
org.wso2.siddhi.core.event.stream.StreamEventCloner streamEventCloner,
org.wso2.siddhi.core.event.stream.populater.ComplexEventPopulater complexEventPopulater)
process in class org.wso2.siddhi.core.query.processor.stream.StreamProcessorstreamEventChunk - 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 start()
public void stop()
public Object[] currentState()
public void restoreState(Object[] state)
state - the stateful objects of the element as an array on the same order provided by currentState().Copyright © 2017 WSO2. All rights reserved.