Class EPEventServiceImpl
- All Implemented Interfaces:
com.espertech.esper.common.internal.context.util.InternalEventRouteDest
,com.espertech.esper.common.internal.event.core.EventServiceSendEventCommon
,com.espertech.esper.common.internal.event.util.EPRuntimeEventProcessWrapped
,EPEventService
,EPEventServiceRouteEvent
,EPEventServiceSendEvent
,EPEventServiceTimeControl
,EPEventServiceQueueProcessor
,EPEventServiceSPI
,TimerCallback
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected static final org.slf4j.Logger
static final int
protected EPServicesContext
protected ThreadLocal<EPEventServiceThreadLocalEntry>
protected UnmatchedListener
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
advanceTime
(long time) Advance time by jumping to the given time in milliseconds (or nanoseconds if so configured).void
advanceTimeSpan
(long targetTime) Advance time by continually-sliding to the given time in milliseconds (or nanoseconds if so configured) at the smallest resolution (non-hopping).void
advanceTimeSpan
(long targetTime, long resolution) Advance time by continually-sliding to the given time in milliseconds (or nanoseconds if so configured) at the provided resolution (hopping).void
void
Switches off the internal timer which tracks system time.void
Switches on the internal timer which tracks system time.void
destroy()
Destroy for destroying an runtime instance: sets references to null and clears thread-localsvoid
dispatch()
Dispatch events.long
Returns current engine time.com.espertech.esper.common.client.EventSender
getEventSender
(String eventTypeName) Returns a facility to process event objects that are of a known type.Returns the time at which the next schedule execution is expected, returns null if no schedule execution is outstanding.long
Number of events evaluated over the lifetime of the event stream processing runtime, or since the last resetStats() call.long
long
getURI()
protected void
handleFilterFault
(com.espertech.esper.common.internal.context.util.EPStatementAgentInstanceHandle faultingHandle, com.espertech.esper.common.client.EventBean theEvent, int filterFaultCount) void
boolean
Returns true for external clocking, false for internal clocking.protected void
processMatches
(com.espertech.esper.common.client.EventBean theEvent) void
processScheduleHandles
(com.espertech.esper.common.internal.collection.ArrayBackedCollection<com.espertech.esper.common.internal.schedule.ScheduleHandle> handles) void
processStatementFilterMultiple
(com.espertech.esper.common.internal.context.util.EPStatementAgentInstanceHandle handle, Object callbackList, com.espertech.esper.common.client.EventBean theEvent, long version, int filterFaultCount) Processing multiple filter matches for a statement.void
processStatementFilterSingle
(com.espertech.esper.common.internal.context.util.EPStatementAgentInstanceHandle handle, com.espertech.esper.common.internal.context.util.EPStatementHandleCallbackFilter handleCallback, com.espertech.esper.common.client.EventBean theEvent, long version, int filterFaultCount) Process a single match.void
Works off the thread's work queue.void
processThreadWorkQueueLatchedSpin
(com.espertech.esper.common.internal.statement.insertintolatch.InsertIntoLatchSpin insertIntoLatch) void
processThreadWorkQueueLatchedWait
(com.espertech.esper.common.internal.statement.insertintolatch.InsertIntoLatchWait insertIntoLatch) void
void
processWrappedEvent
(com.espertech.esper.common.client.EventBean eventBean) void
Reset the count of the number of events received and emittedvoid
route
(com.espertech.esper.common.client.EventBean theEvent, com.espertech.esper.common.internal.context.util.EPStatementHandle epStatementHandle, boolean addToFront, int precedence) void
routeEventAvro
(Object avroGenericDataDotRecord, String eventTypeName) Route the event object back to the runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent.void
routeEventBean
(com.espertech.esper.common.client.EventBean theEvent) void
routeEventBean
(Object event, String eventTypeName) Route the event object back to the runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent.void
routeEventJson
(String json, String eventTypeName) Route the event object back to the runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent.void
routeEventMap
(Map<String, Object> map, String eventTypeName) Route the event object back to the runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent.void
routeEventObjectArray
(Object[] event, String eventTypeName) Route the event object back to the runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent.void
routeEventXMLDOM
(Node event, String eventTypeName) Route the event object back to the runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent.void
sendEventAvro
(Object avroGenericDataDotRecord, String avroEventTypeName) Send an event represented by a Avro GenericData.Record to the runtime.void
sendEventBean
(Object theEvent, String eventTypeName) Send an event represented by an object to the runtime.void
sendEventJson
(String json, String jsonEventTypeName) Send an event represented by a String JSON to the runtime.void
sendEventMap
(Map<String, Object> map, String mapEventTypeName) Send a map containing event property values to the runtime.void
sendEventObjectArray
(Object[] propertyValues, String eventTypeName) Send an object array containing event property values to the runtime.void
sendEventXMLDOM
(Node node, String eventTypeName) Send an event represented by a DOM node to the runtime.void
setInternalEventRouter
(com.espertech.esper.common.internal.context.util.InternalEventRouter internalEventRouter) Sets the route for events to usevoid
setUnmatchedListener
(UnmatchedListener listener) Sets a listener to receive events that are unmatched by any statement.void
Invoked by the internal clocking service at regular intervals.
-
Field Details
-
log
protected static final org.slf4j.Logger log -
MAX_FILTER_FAULT_COUNT
public static final int MAX_FILTER_FAULT_COUNT- See Also:
-
services
-
isPrioritized
protected boolean isPrioritized -
unmatchedListener
-
threadLocals
-
-
Constructor Details
-
EPEventServiceImpl
Constructor.- Parameters:
services
- - references to services
-
-
Method Details
-
getServices
-
setInternalEventRouter
public void setInternalEventRouter(com.espertech.esper.common.internal.context.util.InternalEventRouter internalEventRouter) Sets the route for events to use- Specified by:
setInternalEventRouter
in interfacecom.espertech.esper.common.internal.context.util.InternalEventRouteDest
- Parameters:
internalEventRouter
- router
-
getRoutedInternal
public long getRoutedInternal()- Specified by:
getRoutedInternal
in interfaceEPEventServiceSPI
-
getRoutedExternal
public long getRoutedExternal()- Specified by:
getRoutedExternal
in interfaceEPEventServiceSPI
-
timerCallback
public void timerCallback()Description copied from interface:TimerCallback
Invoked by the internal clocking service at regular intervals.- Specified by:
timerCallback
in interfaceTimerCallback
-
sendEventAvro
Description copied from interface:EPEventServiceSendEvent
Send an event represented by a Avro GenericData.Record to the runtime.Use the route method for sending events into the runtime from within UpdateListener code, to avoid the possibility of a stack overflow due to nested calls to sendEvent (except with the outbound-threading configuration), see
EPEventServiceRouteEvent.routeEventAvro(Object, String)
}).- Specified by:
sendEventAvro
in interfaceEPEventServiceSendEvent
- Specified by:
sendEventAvro
in interfacecom.espertech.esper.common.internal.event.core.EventServiceSendEventCommon
- Parameters:
avroGenericDataDotRecord
- is the event to sent to the runtimeavroEventTypeName
- event type name
-
sendEventJson
Description copied from interface:EPEventServiceSendEvent
Send an event represented by a String JSON to the runtime.Use the route method for sending events into the runtime from within UpdateListener code, to avoid the possibility of a stack overflow due to nested calls to sendEvent (except with the outbound-threading configuration), see
EPEventServiceRouteEvent.routeEventJson(String, String)
}).- Specified by:
sendEventJson
in interfaceEPEventServiceSendEvent
- Parameters:
json
- is the event to sent to the runtimejsonEventTypeName
- event type name
-
sendEventBean
Description copied from interface:EPEventServiceSendEvent
Send an event represented by an object to the runtime.Use the route method for sending events into the runtime from within UpdateListener code, to avoid the possibility of a stack overflow due to nested calls to sendEvent (except with the outbound-threading configuration), see
EPEventServiceRouteEvent.routeEventBean(Object, String)
.- Specified by:
sendEventBean
in interfaceEPEventServiceSendEvent
- Specified by:
sendEventBean
in interfacecom.espertech.esper.common.internal.event.core.EventServiceSendEventCommon
- Parameters:
theEvent
- is the event to sent to the runtimeeventTypeName
- event type name
-
advanceTime
public void advanceTime(long time) Description copied from interface:EPEventServiceTimeControl
Advance time by jumping to the given time in milliseconds (or nanoseconds if so configured).For externally controlling the time within a runtime.
External clocking must be first be enabled by configuration
ConfigurationRuntimeThreading.setInternalTimerEnabled(boolean)
passing false or by callingEPEventServiceTimeControl.clockExternal()
.Time should never move backwards (unless for testing purposes where previous results can be thrown away)
- Specified by:
advanceTime
in interfaceEPEventServiceTimeControl
- Parameters:
time
- time
-
advanceTimeSpan
public void advanceTimeSpan(long targetTime) Description copied from interface:EPEventServiceTimeControl
Advance time by continually-sliding to the given time in milliseconds (or nanoseconds if so configured) at the smallest resolution (non-hopping).For externally controlling the time within a runtime.
External clocking must be first be enabled by configuration
ConfigurationRuntimeThreading.setInternalTimerEnabled(boolean)
passing false or by callingEPEventServiceTimeControl.clockExternal()
.Time should never move backwards (unless for testing purposes where previous results can be thrown away)
- Specified by:
advanceTimeSpan
in interfaceEPEventServiceTimeControl
- Parameters:
targetTime
- time
-
advanceTimeSpan
public void advanceTimeSpan(long targetTime, long resolution) Description copied from interface:EPEventServiceTimeControl
Advance time by continually-sliding to the given time in milliseconds (or nanoseconds if so configured) at the provided resolution (hopping).For externally controlling the time within a runtime.
External clocking must be first be enabled by configuration
ConfigurationRuntimeThreading.setInternalTimerEnabled(boolean)
passing false or by callingEPEventServiceTimeControl.clockExternal()
.Time should never move backwards (unless for testing purposes where previous results can be thrown away)
- Specified by:
advanceTimeSpan
in interfaceEPEventServiceTimeControl
- Parameters:
targetTime
- timeresolution
- the resolution to use
-
getNextScheduledTime
Description copied from interface:EPEventServiceTimeControl
Returns the time at which the next schedule execution is expected, returns null if no schedule execution is outstanding.- Specified by:
getNextScheduledTime
in interfaceEPEventServiceTimeControl
- Returns:
- time of next schedule if any
-
sendEventXMLDOM
Description copied from interface:EPEventServiceSendEvent
Send an event represented by a DOM node to the runtime.Use the route method for sending events into the runtime from within UpdateListener code. to avoid the possibility of a stack overflow due to nested calls to sendEvent (except with the outbound-threading configuration), see
EPEventServiceRouteEvent.routeEventXMLDOM(Node, String)
.- Specified by:
sendEventXMLDOM
in interfaceEPEventServiceSendEvent
- Specified by:
sendEventXMLDOM
in interfacecom.espertech.esper.common.internal.event.core.EventServiceSendEventCommon
- Parameters:
node
- is the DOM node as an eventeventTypeName
- event type name
-
sendEventObjectArray
public void sendEventObjectArray(Object[] propertyValues, String eventTypeName) throws com.espertech.esper.common.client.EPException Description copied from interface:EPEventServiceSendEvent
Send an object array containing event property values to the runtime.Use the route method for sending events into the runtime from within UpdateListener code. to avoid the possibility of a stack overflow due to nested calls to sendEvent (except with the outbound-threading configuration), see
EPEventServiceRouteEvent.routeEventObjectArray(Object[], String)
.- Specified by:
sendEventObjectArray
in interfaceEPEventServiceSendEvent
- Specified by:
sendEventObjectArray
in interfacecom.espertech.esper.common.internal.event.core.EventServiceSendEventCommon
- Parameters:
propertyValues
- - array that contains event property values. Your application must ensure that property values match the exact same order that the property names and types have been declared, and that the array length matches the number of properties declared.eventTypeName
- - event type name- Throws:
com.espertech.esper.common.client.EPException
- - when the processing of the event leads to an error
-
sendEventMap
public void sendEventMap(Map<String, Object> map, String mapEventTypeName) throws com.espertech.esper.common.client.EPExceptionDescription copied from interface:EPEventServiceSendEvent
Send a map containing event property values to the runtime.Use the route method for sending events into the runtime from within UpdateListener code. to avoid the possibility of a stack overflow due to nested calls to sendEvent (except with the outbound-threading configuration), see
EPEventServiceRouteEvent.routeEventMap(java.util.Map, String)
).- Specified by:
sendEventMap
in interfaceEPEventServiceSendEvent
- Specified by:
sendEventMap
in interfacecom.espertech.esper.common.internal.event.core.EventServiceSendEventCommon
- Parameters:
map
- - map that contains event property values. Keys are expected to be of type String while values can be of any type. Keys and values should match those declared via Configuration for the given eventTypeName.mapEventTypeName
- - event type name- Throws:
com.espertech.esper.common.client.EPException
- - when the processing of the event leads to an error
-
routeEventBean
public void routeEventBean(com.espertech.esper.common.client.EventBean theEvent) - Specified by:
routeEventBean
in interfacecom.espertech.esper.common.internal.event.util.EPRuntimeEventProcessWrapped
-
route
public void route(com.espertech.esper.common.client.EventBean theEvent, com.espertech.esper.common.internal.context.util.EPStatementHandle epStatementHandle, boolean addToFront, int precedence) - Specified by:
route
in interfacecom.espertech.esper.common.internal.context.util.InternalEventRouteDest
-
processWrappedEvent
public void processWrappedEvent(com.espertech.esper.common.client.EventBean eventBean) - Specified by:
processWrappedEvent
in interfacecom.espertech.esper.common.internal.event.util.EPRuntimeEventProcessWrapped
-
processThreadWorkQueue
public void processThreadWorkQueue()Works off the thread's work queue.- Specified by:
processThreadWorkQueue
in interfacecom.espertech.esper.common.internal.context.util.InternalEventRouteDest
-
processThreadWorkQueueLatchedWait
public void processThreadWorkQueueLatchedWait(com.espertech.esper.common.internal.statement.insertintolatch.InsertIntoLatchWait insertIntoLatch) - Specified by:
processThreadWorkQueueLatchedWait
in interfaceEPEventServiceQueueProcessor
-
processThreadWorkQueueLatchedSpin
public void processThreadWorkQueueLatchedSpin(com.espertech.esper.common.internal.statement.insertintolatch.InsertIntoLatchSpin insertIntoLatch) - Specified by:
processThreadWorkQueueLatchedSpin
in interfaceEPEventServiceQueueProcessor
-
processThreadWorkQueueUnlatched
- Specified by:
processThreadWorkQueueUnlatched
in interfaceEPEventServiceQueueProcessor
-
processMatches
protected void processMatches(com.espertech.esper.common.client.EventBean theEvent) -
processStatementFilterMultiple
public void processStatementFilterMultiple(com.espertech.esper.common.internal.context.util.EPStatementAgentInstanceHandle handle, Object callbackList, com.espertech.esper.common.client.EventBean theEvent, long version, int filterFaultCount) Processing multiple filter matches for a statement.- Parameters:
handle
- statement handlecallbackList
- object containing callbackstheEvent
- to processversion
- filter versionfilterFaultCount
- filter fault count
-
processStatementFilterSingle
public void processStatementFilterSingle(com.espertech.esper.common.internal.context.util.EPStatementAgentInstanceHandle handle, com.espertech.esper.common.internal.context.util.EPStatementHandleCallbackFilter handleCallback, com.espertech.esper.common.client.EventBean theEvent, long version, int filterFaultCount) Process a single match.- Parameters:
handle
- statementhandleCallback
- callbacktheEvent
- event to indicateversion
- filter versionfilterFaultCount
- filter fault count
-
handleFilterFault
protected void handleFilterFault(com.espertech.esper.common.internal.context.util.EPStatementAgentInstanceHandle faultingHandle, com.espertech.esper.common.client.EventBean theEvent, int filterFaultCount) -
dispatch
public void dispatch()Dispatch events.- Specified by:
dispatch
in interfacecom.espertech.esper.common.internal.context.util.InternalEventRouteDest
-
isExternalClockingEnabled
public boolean isExternalClockingEnabled()Description copied from interface:EPEventServiceTimeControl
Returns true for external clocking, false for internal clocking.- Specified by:
isExternalClockingEnabled
in interfaceEPEventServiceTimeControl
- Returns:
- clocking indicator
-
destroy
public void destroy()Destroy for destroying an runtime instance: sets references to null and clears thread-locals- Specified by:
destroy
in interfaceEPEventServiceSPI
-
initialize
public void initialize()- Specified by:
initialize
in interfaceEPEventServiceSPI
-
clearCaches
public void clearCaches()- Specified by:
clearCaches
in interfaceEPEventServiceSPI
-
setUnmatchedListener
Description copied from interface:EPEventService
Sets a listener to receive events that are unmatched by any statement.Events that can be unmatched are all events that are send into a runtime via one of the sendEvent methods, or that have been generated via insert-into clause.
For an event to be unmatched by any statement, the event must not match any statement's event stream filter criteria (a where-clause is NOT a filter criteria for a stream, as below).
Note: In the following statement a MyEvent event does always match this statement's event stream filter criteria, regardless of the value of the 'quantity' property.
select * from MyEvent where quantity > 5
In the following statement only a MyEvent event with a 'quantity' property value of 5 or less does not match this statement's event stream filter criteria:select * from MyEvent(quantity > 5)
For patterns, if no pattern sub-expression is active for such event, the event is also unmatched.
- Specified by:
setUnmatchedListener
in interfaceEPEventService
- Parameters:
listener
- is the listener to receive notification of unmatched events, or null to unregister a previously registered listener
-
getCurrentTime
public long getCurrentTime()Description copied from interface:EPEventServiceTimeControl
Returns current engine time.If time is provided externally via timer events, the function returns current time as externally provided.
- Specified by:
getCurrentTime
in interfaceEPEventServiceTimeControl
- Returns:
- current engine time
-
getRuntimeURI
- Specified by:
getRuntimeURI
in interfacecom.espertech.esper.common.internal.context.util.InternalEventRouteDest
-
processScheduleHandles
public void processScheduleHandles(com.espertech.esper.common.internal.collection.ArrayBackedCollection<com.espertech.esper.common.internal.schedule.ScheduleHandle> handles) -
routeEventMap
Description copied from interface:EPEventServiceRouteEvent
Route the event object back to the runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent. The route event is processed just like it was sent to the runtime, that is any active expressions seeking that event receive it. The routed event has priority over other events sent to the runtime. In a single-threaded application the routed event is processed before the next event is sent to the runtime.Note: when outbound-threading is enabled, the thread delivering to listeners is not the thread processing the original event. Therefore with outbound-threading enabled the sendEvent method should be used by listeners instead.
- Specified by:
routeEventMap
in interfaceEPEventServiceRouteEvent
- Parameters:
map
- to route internally for processing by the runtimeeventTypeName
- event type name
-
routeEventBean
Description copied from interface:EPEventServiceRouteEvent
Route the event object back to the runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent. The route event is processed just like it was sent to the runtime, that is any active expressions seeking that event receive it. The routed event has priority over other events sent to the runtime. In a single-threaded application the routed event is processed before the next event is sent to the runtime.Note: when outbound-threading is enabled, the thread delivering to listeners is not the thread processing the original event. Therefore with outbound-threading enabled the sendEvent method should be used by listeners instead.
- Specified by:
routeEventBean
in interfaceEPEventServiceRouteEvent
- Parameters:
event
- to route internally for processing by the runtimeeventTypeName
- event type name
-
routeEventObjectArray
Description copied from interface:EPEventServiceRouteEvent
Route the event object back to the runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent. The route event is processed just like it was sent to the runtime, that is any active expressions seeking that event receive it. The routed event has priority over other events sent to the runtime. In a single-threaded application the routed event is processed before the next event is sent to the runtime.Note: when outbound-threading is enabled, the thread delivering to listeners is not the thread processing the original event. Therefore with outbound-threading enabled the sendEvent method should be used by listeners instead.
- Specified by:
routeEventObjectArray
in interfaceEPEventServiceRouteEvent
- Parameters:
event
- to route internally for processing by the runtimeeventTypeName
- event type name
-
routeEventXMLDOM
Description copied from interface:EPEventServiceRouteEvent
Route the event object back to the runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent. The route event is processed just like it was sent to the runtime, that is any active expressions seeking that event receive it. The routed event has priority over other events sent to the runtime. In a single-threaded application the routed event is processed before the next event is sent to the runtime.Note: when outbound-threading is enabled, the thread delivering to listeners is not the thread processing the original event. Therefore with outbound-threading enabled the sendEvent method should be used by listeners instead.
- Specified by:
routeEventXMLDOM
in interfaceEPEventServiceRouteEvent
- Parameters:
event
- to route internally for processing by the runtimeeventTypeName
- event type name
-
routeEventAvro
Description copied from interface:EPEventServiceRouteEvent
Route the event object back to the runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent. The route event is processed just like it was sent to the runtime, that is any active expressions seeking that event receive it. The routed event has priority over other events sent to the runtime. In a single-threaded application the routed event is processed before the next event is sent to the runtime.Note: when outbound-threading is enabled, the thread delivering to listeners is not the thread processing the original event. Therefore with outbound-threading enabled the sendEvent method should be used by listeners instead.
- Specified by:
routeEventAvro
in interfaceEPEventServiceRouteEvent
- Parameters:
avroGenericDataDotRecord
- to route internally for processing by the runtimeeventTypeName
- event type name
-
routeEventJson
Description copied from interface:EPEventServiceRouteEvent
Route the event object back to the runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent. The route event is processed just like it was sent to the runtime, that is any active expressions seeking that event receive it. The routed event has priority over other events sent to the runtime. In a single-threaded application the routed event is processed before the next event is sent to the runtime.Note: when outbound-threading is enabled, the thread delivering to listeners is not the thread processing the original event. Therefore with outbound-threading enabled the sendEvent method should be used by listeners instead.
- Specified by:
routeEventJson
in interfaceEPEventServiceRouteEvent
- Parameters:
json
- to route internally for processing by the runtimeeventTypeName
- event type name
-
getURI
- Specified by:
getURI
in interfacecom.espertech.esper.common.internal.event.util.EPRuntimeEventProcessWrapped
-
getEventSender
public com.espertech.esper.common.client.EventSender getEventSender(String eventTypeName) throws com.espertech.esper.common.client.EventTypeException Description copied from interface:EPEventService
Returns a facility to process event objects that are of a known type.Given an event type name this method returns a sender that allows to send in event objects of that type. The event objects send in via the event sender are expected to match the event type, thus the event sender does not inspect the event object other then perform basic checking.
For events backed by a Java class (JavaBean events), the sender ensures that the object send in matches in class, or implements or extends the class underlying the event type for the given event type name. Note that event type identity for Java class events is the Java class. When assigning two different event type names to the same Java class the names are an alias for the same event type i.e. there is always a single event type to represent a given Java class.
For events backed by a Object[] (Object-array events), the sender does not perform any checking other then checking that the event object indeed is an array of object.
For events backed by a java.util.Map (Map events), the sender does not perform any checking other then checking that the event object indeed implements Map.
For events backed by a org.w3c.Node (XML DOM events), the sender checks that the root element name indeed does match the root element name for the event type name.
- Specified by:
getEventSender
in interfaceEPEventService
- Parameters:
eventTypeName
- is the name of the event type- Returns:
- sender for fast-access processing of event objects of known type (and content)
- Throws:
com.espertech.esper.common.client.EventTypeException
- thrown to indicate that the name does not exist
-
getStatementNearestSchedules
public Map<com.espertech.esper.common.internal.util.DeploymentIdNamePair,Long> getStatementNearestSchedules()- Specified by:
getStatementNearestSchedules
in interfaceEPEventServiceSPI
-
clockInternal
public void clockInternal()Description copied from interface:EPEventServiceTimeControl
Switches on the internal timer which tracks system time. There is no effect if the runtime is already on internal time.Your application may not want to use
EPEventServiceTimeControl.advanceTime(long)
,EPEventServiceTimeControl.advanceTimeSpan(long)
orEPEventServiceTimeControl.advanceTimeSpan(long, long)
after calling this method, since time advances according to JVM time.- Specified by:
clockInternal
in interfaceEPEventServiceTimeControl
-
clockExternal
public void clockExternal()Description copied from interface:EPEventServiceTimeControl
Switches off the internal timer which tracks system time. There is no effect if the runtime is already on external internal time.Your application may want to use
EPEventServiceTimeControl.advanceTime(long)
,EPEventServiceTimeControl.advanceTimeSpan(long)
orEPEventServiceTimeControl.advanceTimeSpan(long, long)
after calling this method to set or advance time.Its generally preferable to turn off internal clocking (and thus turn on external clocking) by configuration
ConfigurationRuntimeThreading.setInternalTimerEnabled(boolean)
passing false.- Specified by:
clockExternal
in interfaceEPEventServiceTimeControl
-
getNumEventsEvaluated
public long getNumEventsEvaluated()Description copied from interface:EPEventService
Number of events evaluated over the lifetime of the event stream processing runtime, or since the last resetStats() call.- Specified by:
getNumEventsEvaluated
in interfaceEPEventService
- Returns:
- number of events received
-
resetStats
public void resetStats()Description copied from interface:EPEventService
Reset the count of the number of events received and emitted- Specified by:
resetStats
in interfaceEPEventService
-