Class ConfigurationRuntimeMetricsReporting

java.lang.Object
com.espertech.esper.common.client.configuration.runtime.ConfigurationRuntimeMetricsReporting
All Implemented Interfaces:
Serializable

public class ConfigurationRuntimeMetricsReporting extends Object implements Serializable
Configuration for metrics reporting.
See Also:
  • Constructor Details

    • ConfigurationRuntimeMetricsReporting

      public ConfigurationRuntimeMetricsReporting()
      Ctor.
  • Method Details

    • addStmtGroup

      public void addStmtGroup(String name, ConfigurationRuntimeMetricsReporting.StmtGroupMetrics config)
      Add a statement group, allowing control of metrics reporting interval per statement or per multiple statements. The reporting interval and be changed at runtime.

      Add pattern include and exclude criteria to control which

      Parameters:
      name - of statement group, not connected to statement name, assigned as an arbitrary identifier for runtime changes to the interval
      config - the statement group metrics configuration
    • isEnableMetricsReporting

      public boolean isEnableMetricsReporting()
      Returns true if metrics reporting is turned on, false if not.
      Returns:
      indicator whether metrics reporting is turned on
    • setEnableMetricsReporting

      public void setEnableMetricsReporting(boolean enableMetricsReporting)
      Set to true to turn metrics reporting on, or false to turn metrics reporting off.
      Parameters:
      enableMetricsReporting - indicator whether metrics reporting should be turned on
    • isThreading

      public boolean isThreading()
      Returns true to indicate that metrics reporting takes place in a separate thread (default), or false to indicate that metrics reporting takes place as part of timer processing.
      Returns:
      indicator whether metrics reporting is threaded
    • setThreading

      public void setThreading(boolean threading)
      Set to true to indicate that metrics reporting should take place in a separate thread, or false to indicate that metrics reporting takes place as part of timer processing.
      Parameters:
      threading - indicator whether metrics reporting is threaded
    • getRuntimeInterval

      public long getRuntimeInterval()
      Returns the runtime metrics production interval in milliseconds.
      Returns:
      runtime metrics production interval
    • setRuntimeInterval

      public void setRuntimeInterval(long runtimeInterval)
      Sets the runtime metrics production interval in milliseconds.

      Use a negative or zero value to disable runtime metrics production.

      Parameters:
      runtimeInterval - runtime metrics production interval
    • getStatementInterval

      public long getStatementInterval()
      Returns the statement metrics production interval in milliseconds, unless statement groups have been defined that override this setting for certain statements.
      Returns:
      statement metrics production interval
    • setStatementInterval

      public void setStatementInterval(long statementInterval)
      Sets the statement metrics production interval in milliseconds, unless statement groups have been defined that override this setting for certain statements.
      Parameters:
      statementInterval - statement metrics production interval
    • getStatementGroups

      Returns a map of statement group and metrics configuration for the statement group.
      Returns:
      map of statement group and metrics configuration
    • isJmxRuntimeMetrics

      public boolean isJmxRuntimeMetrics()
      Returns true if the runtime registers JMX mbeans, with the platform mbean server, that provide key runtime metrics.
      Returns:
      indicator
    • setJmxRuntimeMetrics

      public void setJmxRuntimeMetrics(boolean jmxRuntimeMetrics)
      Set to true to have the the runtime register JMX mbeans, with the platform mbean server, that provide key runtime metrics.
      Parameters:
      jmxRuntimeMetrics - indicator whether enabled or not
    • setStatementGroupInterval

      public void setStatementGroupInterval(String stmtGroupName, long newInterval)
      Sets a new interval for a statement group identified by name.
      Parameters:
      stmtGroupName - name of statement group as assigned through configuration
      newInterval - new interval, or a -1 or zero value to disable reporting