public class DBMetricsReporterImpl extends Object implements DBMetricsReporter, org.springframework.beans.factory.InitializingBean
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_TAG_LENGTH |
static String |
QUERIES_EXECUTION_TIME |
| Constructor and Description |
|---|
DBMetricsReporterImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
boolean |
isEnabled() |
boolean |
isQueryMetricsEnabled() |
boolean |
isQueryStatementsMetricsEnabled() |
void |
reportQueryExecutionTime(long milliseconds,
String queryTpe,
String statementID)
Report the time it took to execute a query.
|
void |
setDataSource(DataSource dataSource) |
void |
setEnabled(boolean enabled) |
void |
setMetricsController(org.alfresco.micrometer.MetricsController metricsController) |
void |
setQueryMetricsEnabled(boolean queryMetricsEnabled) |
void |
setQueryStatementsMetricsEnabled(boolean queryStatementsMetricsEnabled) |
String |
toString() |
public static final String QUERIES_EXECUTION_TIME
public static final int MAX_TAG_LENGTH
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void reportQueryExecutionTime(long milliseconds,
String queryTpe,
String statementID)
DBMetricsReporterreportQueryExecutionTime in interface DBMetricsReportermilliseconds - the delta time to record in milliseconds - must be positivequeryTpe - mandatory, the type of query that we report for: e.g: "select", "insert", "update", "delete"statementID - optional. if this parameter is not provided, a metric without it will be recorded;
this parameter is used only if "isQueryStatementsMetricsEnabled()" is truepublic boolean isEnabled()
isEnabled in interface org.alfresco.micrometer.MetricsReporterisEnabled in interface DBMetricsReporterpublic void setEnabled(boolean enabled)
public boolean isQueryMetricsEnabled()
isQueryMetricsEnabled in interface DBMetricsReporterpublic void setQueryMetricsEnabled(boolean queryMetricsEnabled)
public boolean isQueryStatementsMetricsEnabled()
isQueryStatementsMetricsEnabled in interface DBMetricsReporterpublic void setQueryStatementsMetricsEnabled(boolean queryStatementsMetricsEnabled)
public void setDataSource(DataSource dataSource)
public void setMetricsController(org.alfresco.micrometer.MetricsController metricsController)
Copyright © 2005–2018 Alfresco Software. All rights reserved.