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 java.lang.Object implements DBMetricsReporter, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
-
-
Constructor Summary
Constructors Constructor Description DBMetricsReporterProxy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()booleanisEnabled()booleanisQueryMetricsEnabled()booleanisQueryStatementsMetricsEnabled()voidreportQueryExecutionTime(long milliseconds, java.lang.String queryTpe, java.lang.String statementID)Report the time it took to execute a query.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
-
-
Method Detail
-
reportQueryExecutionTime
public void reportQueryExecutionTime(long milliseconds, java.lang.String queryTpe, java.lang.String statementID)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
public void afterPropertiesSet() throws java.lang.Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
java.lang.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
-
-