Package org.alfresco.metrics.db
Class DBMetricsReporterProxy
java.lang.Object
org.alfresco.metrics.db.DBMetricsReporterProxy
- All Implemented Interfaces:
DBMetricsReporter,MetricsReporter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
public class DBMetricsReporterProxy
extends Object
implements DBMetricsReporter, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanbooleanvoidreportQueryExecutionTime(long milliseconds, String queryTpe, String statementID) Report the time it took to execute a query. queryType and statementID will be used as tags for the recorded metricvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
Constructor Details
-
DBMetricsReporterProxy
public DBMetricsReporterProxy()
-
-
Method Details
-
reportQueryExecutionTime
Description copied from interface:DBMetricsReporterReport the time it took to execute a query. queryType and statementID will be used as tags for the recorded metric- Specified by:
reportQueryExecutionTimein interfaceDBMetricsReporter- Parameters:
milliseconds- 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 true
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceDBMetricsReporter- Specified by:
isEnabledin interfaceMetricsReporter
-
isQueryMetricsEnabled
public boolean isQueryMetricsEnabled()- Specified by:
isQueryMetricsEnabledin interfaceDBMetricsReporter
-
isQueryStatementsMetricsEnabled
public boolean isQueryStatementsMetricsEnabled()- Specified by:
isQueryStatementsMetricsEnabledin interfaceDBMetricsReporter
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-