Interface EPRuntime

All Known Subinterfaces:
EPRuntimeSPI
All Known Implementing Classes:
EPRuntimeImpl

public interface EPRuntime
The runtime for deploying and executing EPL.
  • 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 EPRuntimeDestroyedException
      Returns 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 EPRuntimeDestroyedException
      Returns 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 EPRuntimeDestroyedException
      Returns 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 EPRuntimeDestroyedException
      Returns the metrics service, for managing runtime and statement metrics reporting
      Returns:
      metrics service
      Throws:
      EPRuntimeDestroyedException - thrown when the runtime has been destroyed
    • getEventTypeService

      EPEventTypeService getEventTypeService() throws EPRuntimeDestroyedException
      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 EPRuntimeDestroyedException
      Returns 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

      EPFireAndForgetService getFireAndForgetService() throws EPRuntimeDestroyedException
      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

      EPDeploymentService getDeploymentService() throws EPRuntimeDestroyedException
      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 and EPEventService 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

      ReadWriteLock getRuntimeInstanceWideLock() throws EPRuntimeDestroyedException
      Returns the runtime-instance global read-write lock. The send-event methods takes a read lock. The EPDeploymentService.deploy(EPCompiled) and EPDeploymentService.undeploy(String) methods take a write lock.
      Returns:
      runtime instance global read-write lock
      Throws:
      EPRuntimeDestroyedException - thrown when the runtime has been destroyed
    • addRuntimeStateListener

      void addRuntimeStateListener(EPRuntimeStateListener listener)
      Add a listener to runtime state changes that receives a before-destroy event. The listener collection applies set-semantics.
      Parameters:
      listener - to add
    • removeRuntimeStateListener

      boolean removeRuntimeStateListener(EPRuntimeStateListener listener)
      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

      Map<String,Object> 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