Class ConfigurationRuntimeMetricsReporting
java.lang.Object
com.espertech.esper.common.client.configuration.runtime.ConfigurationRuntimeMetricsReporting
- All Implemented Interfaces:
Serializable
Configuration for metrics reporting.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Class to configure statement metrics reporting for a group of one or more statements. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a statement group, allowing control of metrics reporting interval per statement or per multiple statements.long
Returns the runtime metrics production interval in milliseconds.Returns a map of statement group and metrics configuration for the statement group.long
Returns the statement metrics production interval in milliseconds, unless statement groups have been defined that override this setting for certain statements.boolean
Returns true if metrics reporting is turned on, false if not.boolean
Returns true if the runtime registers JMX mbeans, with the platform mbean server, that provide key runtime metrics.boolean
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.void
setEnableMetricsReporting
(boolean enableMetricsReporting) Set to true to turn metrics reporting on, or false to turn metrics reporting off.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.void
setRuntimeInterval
(long runtimeInterval) Sets the runtime metrics production interval in milliseconds.void
setStatementGroupInterval
(String stmtGroupName, long newInterval) Sets a new interval for a statement group identified by name.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.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.
-
Constructor Details
-
ConfigurationRuntimeMetricsReporting
public ConfigurationRuntimeMetricsReporting()Ctor.
-
-
Method Details
-
addStmtGroup
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 intervalconfig
- 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
Sets a new interval for a statement group identified by name.- Parameters:
stmtGroupName
- name of statement group as assigned through configurationnewInterval
- new interval, or a -1 or zero value to disable reporting
-