Class MetricReportingServiceImpl

java.lang.Object
com.espertech.esper.runtime.internal.metrics.stmtmetrics.MetricReportingServiceImpl
All Implemented Interfaces:
com.espertech.esper.common.internal.metrics.stmtmetrics.MetricEventRouter, com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService, DeploymentStateListener, MetricReportingServiceSPI

public class MetricReportingServiceImpl extends Object implements MetricReportingServiceSPI, com.espertech.esper.common.internal.metrics.stmtmetrics.MetricEventRouter, DeploymentStateListener
Metrics reporting.

Reports for all statements even if not in a statement group, i.e. statement in default group.

  • Constructor Details

    • MetricReportingServiceImpl

      public MetricReportingServiceImpl(com.espertech.esper.common.client.configuration.runtime.ConfigurationRuntimeMetricsReporting specification, String runtimeURI)
      Ctor.
      Parameters:
      specification - configuration
      runtimeURI - runtime URI
  • Method Details

    • isMetricsReportingEnabled

      public boolean isMetricsReportingEnabled()
      Specified by:
      isMetricsReportingEnabled in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
    • addStatementResultListener

      public void addStatementResultListener(MetricsStatementResultListener listener)
      Description copied from interface: MetricReportingServiceSPI
      Add stmt result listener.
      Specified by:
      addStatementResultListener in interface MetricReportingServiceSPI
      Parameters:
      listener - to add
    • removeStatementResultListener

      public void removeStatementResultListener(MetricsStatementResultListener listener)
      Description copied from interface: MetricReportingServiceSPI
      Remove stmt result listener.
      Specified by:
      removeStatementResultListener in interface MetricReportingServiceSPI
      Parameters:
      listener - to remove
    • getStatementOutputHooks

      public CopyOnWriteArraySet<MetricsStatementResultListener> getStatementOutputHooks()
      Description copied from interface: MetricReportingServiceSPI
      Returns output hooks.
      Specified by:
      getStatementOutputHooks in interface MetricReportingServiceSPI
      Returns:
      hooks.
    • setContext

      public void setContext(com.espertech.esper.common.internal.filtersvc.FilterService filterService, com.espertech.esper.common.internal.schedule.SchedulingService schedulingService, com.espertech.esper.common.internal.event.core.EventServiceSendEventCommon eventServiceSendEventInternal)
      Specified by:
      setContext in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
    • processTimeEvent

      public void processTimeEvent(long timeEventTime)
      Specified by:
      processTimeEvent in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
    • iterateMetrics

      public void iterateMetrics(Consumer<com.espertech.esper.common.client.metric.EPMetricsStatementGroup> consumer)
      Specified by:
      iterateMetrics in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
    • destroy

      public void destroy()
      Specified by:
      destroy in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
    • route

      public void route(com.espertech.esper.common.client.metric.MetricEvent metricEvent)
      Specified by:
      route in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricEventRouter
    • accountTime

      public void accountTime(com.espertech.esper.common.internal.metrics.stmtmetrics.StatementMetricHandle metricsHandle, long deltaCPU, long deltaWall, int numInputEvents)
      Specified by:
      accountTime in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
    • accountOutput

      public void accountOutput(com.espertech.esper.common.internal.metrics.stmtmetrics.StatementMetricHandle handle, int numIStream, int numRStream, Object epStatement, Object runtime)
      Specified by:
      accountOutput in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
    • getStatementHandle

      public com.espertech.esper.common.internal.metrics.stmtmetrics.StatementMetricHandle getStatementHandle(int statementId, String deploymentId, String statementName)
      Specified by:
      getStatementHandle in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
    • onDeployment

      public void onDeployment(DeploymentStateEventDeployed event)
      Description copied from interface: DeploymentStateListener
      Called when a deployment completed
      Specified by:
      onDeployment in interface DeploymentStateListener
      Parameters:
      event - deployment information
    • onUndeployment

      public void onUndeployment(DeploymentStateEventUndeployed event)
      Description copied from interface: DeploymentStateListener
      Called when an undeployment completed
      Specified by:
      onUndeployment in interface DeploymentStateListener
      Parameters:
      event - undeployment information
    • setMetricsReportingInterval

      public void setMetricsReportingInterval(String stmtGroupName, long newInterval)
      Specified by:
      setMetricsReportingInterval in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
    • setMetricsReportingStmtDisabled

      public void setMetricsReportingStmtDisabled(String deploymentId, String statementName)
      Specified by:
      setMetricsReportingStmtDisabled in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
    • setMetricsReportingStmtEnabled

      public void setMetricsReportingStmtEnabled(String deploymentId, String statementName)
      Specified by:
      setMetricsReportingStmtEnabled in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
    • setMetricsReportingEnabled

      public void setMetricsReportingEnabled()
      Specified by:
      setMetricsReportingEnabled in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
    • setMetricsReportingDisabled

      public void setMetricsReportingDisabled()
      Specified by:
      setMetricsReportingDisabled in interface com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService