Package org.apache.jackrabbit.stats
Class QueryStatImpl
- java.lang.Object
 - 
- org.apache.jackrabbit.stats.QueryStatImpl
 
 
- 
- All Implemented Interfaces:
 QueryStat,QueryStatCore
public class QueryStatImpl extends java.lang.Object implements QueryStatCore
DefaultQueryStatCoreimplementation 
- 
- 
Constructor Summary
Constructors Constructor Description QueryStatImpl() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearPopularQueriesQueue()clears the Popular queuevoidclearSlowQueriesQueue()clears the Slow queueQueryStatDto[]getPopularQueries()intgetPopularQueriesQueueSize()QueryStatDto[]getSlowQueries()intgetSlowQueriesQueueSize()booleanisEnabled()If this service is currently registering statsvoidlogQuery(java.lang.String language, java.lang.String statement, long durationMs)Logs 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 
 - 
 
- 
- 
Method Detail
- 
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
 
- 
logQuery
public void logQuery(java.lang.String language, java.lang.String statement, long durationMs)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
public QueryStatDto[] getSlowQueries()
- Specified by:
 getSlowQueriesin interfaceQueryStat- Returns:
 - a sorted array containing the top
         
QueryStat.getSlowQueriesQueueSize()slowest queries 
 
- 
getPopularQueries
public QueryStatDto[] 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
 
 - 
 
 -