Class QueryStatsMBeanImpl
- java.lang.Object
-
- javax.management.StandardMBean
-
- org.apache.jackrabbit.oak.commons.jmx.AnnotatedStandardMBean
-
- org.apache.jackrabbit.oak.query.stats.QueryStatsMBeanImpl
-
- All Implemented Interfaces:
DynamicMBean,MBeanRegistration,QueryStatsMBean,QueryStatsReporter
public class QueryStatsMBeanImpl extends AnnotatedStandardMBean implements QueryStatsMBean, QueryStatsReporter
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.query.stats.QueryStatsMBean
TYPE
-
-
Constructor Summary
Constructors Constructor Description QueryStatsMBeanImpl(QueryEngineSettings settings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringasJson()booleangetCaptureStackTraces()intgetEvictionCount()TabularDatagetPopularQueries()QueryStatsData.QueryExecutionStatsgetQueryExecution(String statement, String language)TabularDatagetSlowQueries()Get the slow queries.voidresetStats()voidsetCaptureStackTraces(boolean captureStackTraces)Whether to capture a thread dump in addition to the thread name.-
Methods inherited from class org.apache.jackrabbit.oak.commons.jmx.AnnotatedStandardMBean
getDescription, getDescription, getDescription, getDescription, getImpact, getParameterName
-
Methods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
-
-
-
-
Constructor Detail
-
QueryStatsMBeanImpl
public QueryStatsMBeanImpl(QueryEngineSettings settings)
-
-
Method Detail
-
getSlowQueries
public TabularData getSlowQueries()
Description copied from interface:QueryStatsMBeanGet the slow queries. Those are the ones that scan more than 100'000 nodes, or the configured maximum number of nodes to scan. (Raw execution time is not taken into account, as execution can be slow if the code is not compiled yet.)- Specified by:
getSlowQueriesin interfaceQueryStatsMBean- Returns:
- the slow queries table
-
getPopularQueries
public TabularData getPopularQueries()
- Specified by:
getPopularQueriesin interfaceQueryStatsMBean
-
resetStats
public void resetStats()
- Specified by:
resetStatsin interfaceQueryStatsMBean
-
setCaptureStackTraces
public void setCaptureStackTraces(boolean captureStackTraces)
Description copied from interface:QueryStatsMBeanWhether to capture a thread dump in addition to the thread name. No thread name / thread dump is captures for internal queries.- Specified by:
setCaptureStackTracesin interfaceQueryStatsMBean- Parameters:
captureStackTraces- the new valu
-
getCaptureStackTraces
public boolean getCaptureStackTraces()
- Specified by:
getCaptureStackTracesin interfaceQueryStatsMBean
-
asJson
public String asJson()
- Specified by:
asJsonin interfaceQueryStatsMBean
-
getQueryExecution
public QueryStatsData.QueryExecutionStats getQueryExecution(String statement, String language)
- Specified by:
getQueryExecutionin interfaceQueryStatsReporter
-
getEvictionCount
public int getEvictionCount()
-
-