Class CEPEsperProcessor

  • All Implemented Interfaces:
    DataEmitter, DataReceiver, CEPEsperProcessorMXBean

    public class CEPEsperProcessor
    extends Module
    implements DataReceiver, DataEmitter, CEPEsperProcessorMXBean
    A module that processes data using the Esper Runtime. The module can receive any type of data. Null data values are ignored. Map and Node data types are supplied to the esper runtime so that esper specific interpretation is possible. All maps are supplied to the runtime with the type name map.

    When requesting data, either an EPL or a Pattern query has to be specified. The results of the query are emitted to the next module in the data flow.

    Multiple queries can be submitted when creating a data flow. When multiple queries are submitted, only the results of the last query are emitted to the next stage in the data flow.

    Any errors in the query syntax will result in an error when setting up the data flow, except when the module is configured to use external time.

    If the module is configured to use external time, errors in query syntax are not reported until after the module has received data that implements TimestampCarrier. Errors in query will result in the data flow being cancelled. When configured to use external time, the module creates the query statements after it receives the first TimestampCarrier. Any non-TimestampCarrier received prior to that are reported and ignored.

    Module Features

    CEPEsperProcessor capabilities
    CapabilitiesData Emitter, Data Receiver
    DataFlow Request ParametersString: CEP query; String[]: Multiple CEP queries
    Stops data flowsIf it encounters an error when creating statements in external time mode.
    Start OperationInitializes Esper Runtime
    Stop OperationDestroys Esper Runtime
    Management InterfaceCEPEsperProcessorMXBean
    FactoryCEPEsperFactory
    Since:
    1.0.0
    Version:
    $Id$
    Author:
    anshul@marketcetera.com, toli@marketcetera.com
    • Field Detail

      • mSelfPostingEvents

        private final ThreadLocal<Integer> mSelfPostingEvents
        Reference counter that keep track if we get events posted back into us from events that we emit ie we emit to a strategy that sends events in back to this Esper instance 0 means "not self-posted event", ie "send regular events to Esper"
      • mService

        private com.espertech.esper.client.EPServiceProvider mService
        The Esper engine runtime.
      • mRequests

        private final Map<RequestID,​List<com.espertech.esper.client.EPStatement>> mRequests
        The table of requests that this module is currently processing.
      • mConfiguration

        private String mConfiguration
        Configuration file location.
      • mUseExternalTime

        private volatile boolean mUseExternalTime
        If the module should be configured for external time.
      • PATTERN_QUERY_PREFIX

        private static final String PATTERN_QUERY_PREFIX
        The prefix for pattern queries - they all start with p:xxxxx
        See Also:
        Constant Field Values
    • Constructor Detail

      • CEPEsperProcessor

        protected CEPEsperProcessor​(ModuleURN inURN,
                                    boolean inAutoStart)
      • CEPEsperProcessor

        protected CEPEsperProcessor​(ModuleURN inURN)
        Creates an instance.
        Parameters:
        inURN - the module URN.