Package org.apache.jackrabbit.stats
Class QueryStatImpl
java.lang.Object
org.apache.jackrabbit.stats.QueryStatImpl
- All Implemented Interfaces:
QueryStat,QueryStatCore
Default
QueryStatCore implementation-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclears the Popular queuevoidclears the Slow queueintintbooleanIf this service is currently registering statsvoidLogs the call of each query ran on the repository.voidreset()clears all datavoidsetEnabled(boolean enabled) Enables/Disables the servicevoidsetPopularQueriesQueueSize(int size) Change the size of the Popular queuevoidsetSlowQueriesQueueSize(int size) Change the size of the Slow queue
-
Constructor Details
-
QueryStatImpl
public QueryStatImpl()
-
-
Method Details
-
getSlowQueriesQueueSize
public int getSlowQueriesQueueSize()- Specified by:
getSlowQueriesQueueSizein interfaceQueryStat- Returns:
- size of the Slow queue
-
setSlowQueriesQueueSize
public void setSlowQueriesQueueSize(int size) Description copied from interface:QueryStatChange the size of the Slow queue- Specified by:
setSlowQueriesQueueSizein interfaceQueryStat- Parameters:
size- the new size
-
isEnabled
public boolean isEnabled()Description copied from interface:QueryStatIf this service is currently registering stats -
setEnabled
public void setEnabled(boolean enabled) Description copied from interface:QueryStatEnables/Disables the service- Specified by:
setEnabledin interfaceQueryStat- Parameters:
enabled-
-
logQuery
Description copied from interface:QueryStatCoreLogs the call of each query ran on the repository.- Specified by:
logQueryin interfaceQueryStatCore- Parameters:
language- the query language, seeQueryManager.getSupportedQueryLanguages()statement- the querydurationMs- time in ms
-
clearSlowQueriesQueue
public void clearSlowQueriesQueue()Description copied from interface:QueryStatclears the Slow queue- Specified by:
clearSlowQueriesQueuein interfaceQueryStat
-
getSlowQueries
- Specified by:
getSlowQueriesin interfaceQueryStat- Returns:
- a sorted array containing the top
QueryStat.getSlowQueriesQueueSize()slowest queries
-
getPopularQueries
- Specified by:
getPopularQueriesin interfaceQueryStat- Returns:
- a sorted array containing the
QueryStat.getPopularQueriesQueueSize()most popular queries
-
getPopularQueriesQueueSize
public int getPopularQueriesQueueSize()- Specified by:
getPopularQueriesQueueSizein interfaceQueryStat- Returns:
- size of the Popular queue
-
setPopularQueriesQueueSize
public void setPopularQueriesQueueSize(int size) Description copied from interface:QueryStatChange the size of the Popular queue- Specified by:
setPopularQueriesQueueSizein interfaceQueryStat- Parameters:
size- the new size
-
clearPopularQueriesQueue
public void clearPopularQueriesQueue()Description copied from interface:QueryStatclears the Popular queue- Specified by:
clearPopularQueriesQueuein interfaceQueryStat
-
reset
public void reset()Description copied from interface:QueryStatclears all data
-