Interface EPMetricsService


public interface EPMetricsService
Service for metrics reporting.
  • Method Details

    • setMetricsReportingInterval

      void setMetricsReportingInterval(String stmtGroupName, long newIntervalMSec) throws ConfigurationException
      Sets a new interval for metrics reporting for a pre-configured statement group, or changes the default statement reporting interval if supplying a null value for the statement group name.
      Parameters:
      stmtGroupName - name of statement group, provide a null value for the default statement interval (default group)
      newIntervalMSec - millisecond interval, use zero or negative value to disable
      Throws:
      ConfigurationException - if the statement group cannot be found
    • setMetricsReportingStmtEnabled

      void setMetricsReportingStmtEnabled(String deploymentId, String statementName) throws ConfigurationException
      Enable metrics reporting for the given statement.

      This operation can only be performed at runtime and is not available at runtime initialization time.

      Statement metric reporting follows the configured default or statement group interval.

      Only if metrics reporting (on the runtimelevel) has been enabled at initialization time can statement-level metrics reporting be enabled through this method.

      Parameters:
      deploymentId - for which to enable metrics reporting
      statementName - for which to enable metrics reporting
      Throws:
      ConfigurationException - if the statement cannot be found
    • setMetricsReportingStmtDisabled

      void setMetricsReportingStmtDisabled(String deploymentId, String statementName) throws ConfigurationException
      Disable metrics reporting for a given statement.
      Parameters:
      deploymentId - for which to enable metrics reporting
      statementName - for which to disable metrics reporting
      Throws:
      ConfigurationException - if the statement cannot be found
    • setMetricsReportingEnabled

      void setMetricsReportingEnabled() throws ConfigurationException
      Enable runtime-level metrics reporting.

      Use this operation to control, at runtime, metrics reporting globally.

      Only if metrics reporting (on the runtimelevel) has been enabled at initialization time can metrics reporting be re-enabled at runtime through this method.

      Throws:
      ConfigurationException - if use at runtime and metrics reporting had not been enabled at initialization time
    • setMetricsReportingDisabled

      void setMetricsReportingDisabled() throws ConfigurationException
      Disable runtime-level metrics reporting.

      Use this operation to control, at runtime, metrics reporting globally. Setting metrics reporting to disabled removes all performance cost for metrics reporting.

      Throws:
      ConfigurationException - if use at runtime and metrics reporting had not been enabled at initialization time
    • iterateStatementGroups

      void iterateStatementGroups(Consumer<EPMetricsStatementGroup> consumer)
      Iterate statement groups.

      This by itself does not hold a lock but iterating each group may hold locks.

      Parameters:
      consumer - of groups
    • getRuntimeMetric

      RuntimeMetric getRuntimeMetric()
      Returns the current runtime metric.

      The delta-value(s) will be zero. The result is without delta and without resetting count.

      Returns:
      runtime metrio