Interface EPRuntime
- All Known Subinterfaces:
EPRuntimeSPI
- All Known Implementing Classes:
EPRuntimeImpl
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a listener to runtime state changes that receives a before-destroy event.void
destroy()
Destroys the runtime.com.espertech.esper.common.client.configuration.Configuration
Returns a deep-copy of the configuration that is actively in use by the runtime.Returns the transient configuration, which are configuration values that are passed by reference (and not by value)Provides naming context for public named objects.com.espertech.esper.common.client.context.EPContextPartitionService
Returns the context partition service, for context partition informationcom.espertech.esper.common.client.dataflow.core.EPDataFlowService
Returns the data flow service, for managing dataflowsReturns the deployment service, for deploying and undeploying compiled modulesReturns the event service, for sending events to the runtime and for controlling timeReturns the event type service, for obtaining information on event typesReturns the fire-and-forget service, for executing fire-and-forget queriescom.espertech.esper.common.client.metric.EPMetricsService
Returns the metrics service, for managing runtime and statement metrics reportingcom.espertech.esper.common.client.render.EPRenderEventService
Returns the event rendering service, for rendering events to JSON and XMLReturns the runtime-instance global read-write lock.com.espertech.esper.common.client.EPCompilerPathable
Returns a path object for use by the compiler that represents a snapshot of the EPL objects deployed into the runtime at the time of this call.Returns the stage service, for managing stagesgetURI()
Returns the runtime URI, or "default" if this is the default runtime.com.espertech.esper.common.client.variable.EPVariableService
Returns the variable service, for reading and writing variablesvoid
Frees any resources associated with this runtime instance, and leaves the runtime instance ready for further use.boolean
Returns true if the runtime is in destroyed state, or false if not.void
Remove all listeners to runtime state changes.boolean
Removate a listener to runtime state changes.
-
Method Details
-
getEventService
Returns the event service, for sending events to the runtime and for controlling time- Returns:
- event service
- Throws:
EPRuntimeDestroyedException
- thrown when the runtime has been destroyed
-
getDataFlowService
com.espertech.esper.common.client.dataflow.core.EPDataFlowService getDataFlowService() throws EPRuntimeDestroyedExceptionReturns the data flow service, for managing dataflows- Returns:
- data flow service
- Throws:
EPRuntimeDestroyedException
- thrown when the runtime has been destroyed
-
getContextPartitionService
com.espertech.esper.common.client.context.EPContextPartitionService getContextPartitionService() throws EPRuntimeDestroyedExceptionReturns the context partition service, for context partition information- Returns:
- context partition service
- Throws:
EPRuntimeDestroyedException
- thrown when the runtime has been destroyed
-
getVariableService
com.espertech.esper.common.client.variable.EPVariableService getVariableService() throws EPRuntimeDestroyedExceptionReturns the variable service, for reading and writing variables- Returns:
- variable service
- Throws:
EPRuntimeDestroyedException
- thrown when the runtime has been destroyed
-
getMetricsService
com.espertech.esper.common.client.metric.EPMetricsService getMetricsService() throws EPRuntimeDestroyedExceptionReturns the metrics service, for managing runtime and statement metrics reporting- Returns:
- metrics service
- Throws:
EPRuntimeDestroyedException
- thrown when the runtime has been destroyed
-
getEventTypeService
Returns the event type service, for obtaining information on event types- Returns:
- event type service
- Throws:
EPRuntimeDestroyedException
- thrown when the runtime has been destroyed
-
getRenderEventService
com.espertech.esper.common.client.render.EPRenderEventService getRenderEventService() throws EPRuntimeDestroyedExceptionReturns the event rendering service, for rendering events to JSON and XML- Returns:
- render event service
- Throws:
EPRuntimeDestroyedException
- thrown when the runtime has been destroyed
-
getFireAndForgetService
Returns the fire-and-forget service, for executing fire-and-forget queries- Returns:
- fire-and-forget service
- Throws:
EPRuntimeDestroyedException
- thrown when the runtime has been destroyed
-
getDeploymentService
Returns the deployment service, for deploying and undeploying compiled modules- Returns:
- deployment service
- Throws:
EPRuntimeDestroyedException
- thrown when the runtime has been destroyed
-
getStageService
Returns the stage service, for managing stages- Returns:
- stage service
- Throws:
EPRuntimeDestroyedException
- thrown when the runtime has been destroyed
-
isDestroyed
boolean isDestroyed()Returns true if the runtime is in destroyed state, or false if not.- Returns:
- indicator whether the runtime has been destroyed
-
initialize
void initialize()Frees any resources associated with this runtime instance, and leaves the runtime instance ready for further use.Do not use the
EPDeploymentService
administrative andEPEventService
runtime instances obtained before the initialize (including related services such as configuration, module management, etc.). Your application must obtain new administrative and runtime instances.Retains the existing configuration of the runtime instance but forgets any runtime configuration changes.
Stops and destroys any existing statement resources such as filters, patterns, expressions, views.
-
getURI
String getURI()Returns the runtime URI, or "default" if this is the default runtime.- Returns:
- runtime URI
-
getContext
Provides naming context for public named objects.An extension point designed for use by input and output adapters as well as other extension services.
- Returns:
- naming context providing name-to-object bindings
- Throws:
EPRuntimeDestroyedException
- thrown when the runtime instance has been destroyed
-
destroy
void destroy()Destroys the runtime.Releases any resources held by the runtime. The runtime enteres a state in which operations provided by the runtime are not guaranteed to operate properly.
Removes the runtime URI from the known URIs. Allows configuration to change for the instance.
When destroying a runtime your application must make sure that threads that are sending events into the runtime have completed their work. More generally, the runtime should not be currently in use during or after the destroy operation.
-
getRuntimeInstanceWideLock
Returns the runtime-instance global read-write lock. The send-event methods takes a read lock. TheEPDeploymentService.deploy(EPCompiled)
andEPDeploymentService.undeploy(String)
methods take a write lock.- Returns:
- runtime instance global read-write lock
- Throws:
EPRuntimeDestroyedException
- thrown when the runtime has been destroyed
-
addRuntimeStateListener
Add a listener to runtime state changes that receives a before-destroy event. The listener collection applies set-semantics.- Parameters:
listener
- to add
-
removeRuntimeStateListener
Removate a listener to runtime state changes.- Parameters:
listener
- to remove- Returns:
- true to indicate the listener was removed, or fals
-
removeAllRuntimeStateListeners
void removeAllRuntimeStateListeners()Remove all listeners to runtime state changes. -
getConfigurationDeepCopy
com.espertech.esper.common.client.configuration.Configuration getConfigurationDeepCopy()Returns a deep-copy of the configuration that is actively in use by the runtime.Note: This can be an expensive operation.
- Returns:
- deep copy of the configuration
-
getConfigurationTransient
Returns the transient configuration, which are configuration values that are passed by reference (and not by value)- Returns:
- transient configuration
-
getRuntimePath
com.espertech.esper.common.client.EPCompilerPathable getRuntimePath()Returns a path object for use by the compiler that represents a snapshot of the EPL objects deployed into the runtime at the time of this call. The EPL objects deployed after a call to this method are not included.- Returns:
- path
-