Class ConfigurationRuntimeMetricsReporting.StmtGroupMetrics
java.lang.Object
com.espertech.esper.common.client.configuration.runtime.ConfigurationRuntimeMetricsReporting.StmtGroupMetrics
- All Implemented Interfaces:
Serializable
- Enclosing class:
- ConfigurationRuntimeMetricsReporting
public static class ConfigurationRuntimeMetricsReporting.StmtGroupMetrics
extends Object
implements Serializable
Class to configure statement metrics reporting for a group of one or more statements.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExcludeLike
(String likeExpression) Exclude all statements from the statement group that match the SQL like-expression by statement name.void
addExcludeRegEx
(String regexExpression) Exclude all statements in the statement group that match the regular expression by statement name.void
addIncludeLike
(String likeExpression) Include all statements in the statement group that match the SQL like-expression by statement name.void
addIncludeRegex
(String regexExpression) Include all statements in the statement group that match the regular expression by statement name.long
Returns the reporting interval for statement metrics for statements in the statement group.int
Returns the initial capacity number of statements held by the statement group.Returns a list of patterns that indicate whether a statement, by the statement name matching or not matching each pattern, falls within the statement group.boolean
If this flag is set then all statement names are automatically included in this statement group, and through exclude-pattern certain statement names can be omittedboolean
Returns true to indicate that inactive statements (statements without events or timer activity) are also reported.void
setDefaultInclude
(boolean defaultInclude) Set this flag to true and all statement names are automatically included in this statement group, and through exclude-pattern certain statement names can be omittedvoid
setInterval
(long interval) Sets the reporting interval for statement metrics for statements in the statement group.void
setNumStatements
(int numStatements) Sets the initial capacity number of statements held by the statement group.void
setReportInactive
(boolean reportInactive) Set to true to indicate that inactive statements (statements without events or timer activity) are also reported, or false to omit reporting for inactive statements.
-
Constructor Details
-
StmtGroupMetrics
public StmtGroupMetrics()Ctor.
-
-
Method Details
-
addIncludeLike
Include all statements in the statement group that match the SQL like-expression by statement name.- Parameters:
likeExpression
- to match
-
addExcludeLike
Exclude all statements from the statement group that match the SQL like-expression by statement name.- Parameters:
likeExpression
- to match
-
addIncludeRegex
Include all statements in the statement group that match the regular expression by statement name.- Parameters:
regexExpression
- to match
-
addExcludeRegEx
Exclude all statements in the statement group that match the regular expression by statement name.- Parameters:
regexExpression
- to match
-
getInterval
public long getInterval()Returns the reporting interval for statement metrics for statements in the statement group.- Returns:
- interval
-
setInterval
public void setInterval(long interval) Sets the reporting interval for statement metrics for statements in the statement group.- Parameters:
interval
- a negative or zero value to disable reporting for this group of statements
-
getPatterns
Returns a list of patterns that indicate whether a statement, by the statement name matching or not matching each pattern, falls within the statement group.Include-patterns are boolean true in the pair of pattern and boolean. Exclude-patterns are boolean false.
- Returns:
- list of include and exclude pattern
-
getNumStatements
public int getNumStatements()Returns the initial capacity number of statements held by the statement group.- Returns:
- initial capacity
-
setNumStatements
public void setNumStatements(int numStatements) Sets the initial capacity number of statements held by the statement group.- Parameters:
numStatements
- initial capacity
-
isReportInactive
public boolean isReportInactive()Returns true to indicate that inactive statements (statements without events or timer activity) are also reported.- Returns:
- true for reporting inactive statements
-
setReportInactive
public void setReportInactive(boolean reportInactive) Set to true to indicate that inactive statements (statements without events or timer activity) are also reported, or false to omit reporting for inactive statements.- Parameters:
reportInactive
- set to true for reporting inactive statements
-
isDefaultInclude
public boolean isDefaultInclude()If this flag is set then all statement names are automatically included in this statement group, and through exclude-pattern certain statement names can be omittedIf this flag is not set then all statement names are automatically excluded in this statement group, and through include-pattern certain statement names can be included.
The default is false, i.e. statements must be explicitly included.
- Returns:
- true for include all statements, false for explicitly include
-
setDefaultInclude
public void setDefaultInclude(boolean defaultInclude) Set this flag to true and all statement names are automatically included in this statement group, and through exclude-pattern certain statement names can be omittedSet this flag to false and all statement names are automatically excluded in this statement group, and through include-pattern certain statement names can be included.
The default is false, i.e. statements must be explicitly included.
- Parameters:
defaultInclude
- true for include all statements, false for explicitly include statements
-