Class CEPEsperProcessor.ExternalTimeDelegate
- java.lang.Object
-
- org.marketcetera.modules.cep.esper.CEPEsperProcessor.RegularDelegate
-
- org.marketcetera.modules.cep.esper.CEPEsperProcessor.ExternalTimeDelegate
-
- All Implemented Interfaces:
CEPEsperProcessor.ProcessingDelegate
- Enclosing class:
- CEPEsperProcessor
private class CEPEsperProcessor.ExternalTimeDelegate extends CEPEsperProcessor.RegularDelegate
Responsible for implemneting external time behaviour - instead of sending the querieis straight to Esper, we wait until the first time event comes in, and only start CEP then
-
-
Field Summary
Fields Modifier and Type Field Description private Map<DataFlowID,List<Pair<DataEmitterSupport,String[]>>>mUnprocessedRequests
-
Constructor Summary
Constructors Modifier Constructor Description privateExternalTimeDelegate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelRequest(DataFlowID inFlowID, RequestID inRequestID)Go through and destroy all the existing EPL statementsvoidpreProcessData(DataFlowID inFlowID, Object inData)Seed the Esper engine with the incoming time event, then delegate to the regularprocessRequest(String[], DataEmitterSupport)implementation.voidprocessRequest(String[] inStmts, DataEmitterSupport inSupport)Cache the incoming requests - they will be kicked off after we receive the first time event withinpreProcessData(DataFlowID, Object).
-
-
-
Field Detail
-
mUnprocessedRequests
private final Map<DataFlowID,List<Pair<DataEmitterSupport,String[]>>> mUnprocessedRequests
-
-
Method Detail
-
processRequest
public void processRequest(String[] inStmts, DataEmitterSupport inSupport)
Cache the incoming requests - they will be kicked off after we receive the first time event withinpreProcessData(DataFlowID, Object).- Specified by:
processRequestin interfaceCEPEsperProcessor.ProcessingDelegate- Overrides:
processRequestin classCEPEsperProcessor.RegularDelegate- Parameters:
inStmts- the query statements.inSupport- the emitter support to emit data.
-
cancelRequest
public void cancelRequest(DataFlowID inFlowID, RequestID inRequestID)
Description copied from class:CEPEsperProcessor.RegularDelegateGo through and destroy all the existing EPL statements- Specified by:
cancelRequestin interfaceCEPEsperProcessor.ProcessingDelegate- Overrides:
cancelRequestin classCEPEsperProcessor.RegularDelegate- Parameters:
inFlowID- the flowID of the data flow to cancel.inRequestID- the requestID of the data flow to cancel.
-
preProcessData
public void preProcessData(DataFlowID inFlowID, Object inData) throws StopDataFlowException
Seed the Esper engine with the incoming time event, then delegate to the regularprocessRequest(String[], DataEmitterSupport)implementation. If the incoming events aren't TimestampCarriers, then just discard them- Specified by:
preProcessDatain interfaceCEPEsperProcessor.ProcessingDelegate- Overrides:
preProcessDatain classCEPEsperProcessor.RegularDelegate- Parameters:
inFlowID- the data flowID.inData- the received data.- Throws:
StopDataFlowException- if the data flow should be stopped.
-
-