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 String
asJson()
boolean
getCaptureStackTraces()
int
getEvictionCount()
TabularData
getPopularQueries()
QueryStatsData.QueryExecutionStats
getQueryExecution(String statement, String language)
TabularData
getSlowQueries()
Get the slow queries.void
resetStats()
void
setCaptureStackTraces(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:QueryStatsMBean
Get 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:
getSlowQueries
in interfaceQueryStatsMBean
- Returns:
- the slow queries table
-
getPopularQueries
public TabularData getPopularQueries()
- Specified by:
getPopularQueries
in interfaceQueryStatsMBean
-
resetStats
public void resetStats()
- Specified by:
resetStats
in interfaceQueryStatsMBean
-
setCaptureStackTraces
public void setCaptureStackTraces(boolean captureStackTraces)
Description copied from interface:QueryStatsMBean
Whether to capture a thread dump in addition to the thread name. No thread name / thread dump is captures for internal queries.- Specified by:
setCaptureStackTraces
in interfaceQueryStatsMBean
- Parameters:
captureStackTraces
- the new valu
-
getCaptureStackTraces
public boolean getCaptureStackTraces()
- Specified by:
getCaptureStackTraces
in interfaceQueryStatsMBean
-
asJson
public String asJson()
- Specified by:
asJson
in interfaceQueryStatsMBean
-
getQueryExecution
public QueryStatsData.QueryExecutionStats getQueryExecution(String statement, String language)
- Specified by:
getQueryExecution
in interfaceQueryStatsReporter
-
getEvictionCount
public int getEvictionCount()
-
-