Package org.apache.jackrabbit.stats
Class QueryStatImpl
- java.lang.Object
-
- org.apache.jackrabbit.stats.QueryStatImpl
-
- All Implemented Interfaces:
QueryStat
,QueryStatCore
public class QueryStatImpl extends Object implements QueryStatCore
DefaultQueryStatCore
implementation
-
-
Constructor Summary
Constructors Constructor Description QueryStatImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearPopularQueriesQueue()
void
clearSlowQueriesQueue()
QueryStatDto[]
getPopularQueries()
int
getPopularQueriesQueueSize()
QueryStatDto[]
getSlowQueries()
int
getSlowQueriesQueueSize()
boolean
isEnabled()
void
logQuery(String language, String statement, long durationMs)
Logs the call of each query ran on the repository.void
reset()
void
setEnabled(boolean enabled)
void
setPopularQueriesQueueSize(int size)
void
setSlowQueriesQueueSize(int size)
-
-
-
Method Detail
-
getSlowQueriesQueueSize
public int getSlowQueriesQueueSize()
- Specified by:
getSlowQueriesQueueSize
in interfaceQueryStat
-
setSlowQueriesQueueSize
public void setSlowQueriesQueueSize(int size)
- Specified by:
setSlowQueriesQueueSize
in interfaceQueryStat
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabled
in interfaceQueryStat
-
logQuery
public void logQuery(String language, String statement, long durationMs)
Description copied from interface:QueryStatCore
Logs the call of each query ran on the repository.- Specified by:
logQuery
in interfaceQueryStatCore
- Parameters:
language
- the query language, seeQueryManager.getSupportedQueryLanguages()
statement
- the querydurationMs
- time in ms
-
clearSlowQueriesQueue
public void clearSlowQueriesQueue()
- Specified by:
clearSlowQueriesQueue
in interfaceQueryStat
-
getSlowQueries
public QueryStatDto[] getSlowQueries()
- Specified by:
getSlowQueries
in interfaceQueryStat
-
getPopularQueries
public QueryStatDto[] getPopularQueries()
- Specified by:
getPopularQueries
in interfaceQueryStat
-
getPopularQueriesQueueSize
public int getPopularQueriesQueueSize()
- Specified by:
getPopularQueriesQueueSize
in interfaceQueryStat
-
setPopularQueriesQueueSize
public void setPopularQueriesQueueSize(int size)
- Specified by:
setPopularQueriesQueueSize
in interfaceQueryStat
-
clearPopularQueriesQueue
public void clearPopularQueriesQueue()
- Specified by:
clearPopularQueriesQueue
in interfaceQueryStat
-
-