public class QueryStatImpl extends Object implements QueryStatCore
QueryStatCore
implementationConstructor and Description |
---|
QueryStatImpl() |
Modifier and Type | Method and Description |
---|---|
void |
clearPopularQueriesQueue()
clears the Popular queue
|
void |
clearSlowQueriesQueue()
clears the Slow queue
|
QueryStatDto[] |
getPopularQueries() |
int |
getPopularQueriesQueueSize() |
QueryStatDto[] |
getSlowQueries() |
int |
getSlowQueriesQueueSize() |
boolean |
isEnabled()
If this service is currently registering stats
|
void |
logQuery(String language,
String statement,
long durationMs)
Logs the call of each query ran on the repository.
|
void |
reset()
clears all data
|
void |
setEnabled(boolean enabled)
Enables/Disables the service
|
void |
setPopularQueriesQueueSize(int size)
Change the size of the Popular queue
|
void |
setSlowQueriesQueueSize(int size)
Change the size of the Slow queue
|
public int getSlowQueriesQueueSize()
getSlowQueriesQueueSize
in interface QueryStat
public void setSlowQueriesQueueSize(int size)
QueryStat
setSlowQueriesQueueSize
in interface QueryStat
size
- the new sizepublic boolean isEnabled()
QueryStat
public void setEnabled(boolean enabled)
QueryStat
setEnabled
in interface QueryStat
public void logQuery(String language, String statement, long durationMs)
QueryStatCore
logQuery
in interface QueryStatCore
language
- the query language, see
QueryManager.getSupportedQueryLanguages()
statement
- the querydurationMs
- time in mspublic void clearSlowQueriesQueue()
QueryStat
clearSlowQueriesQueue
in interface QueryStat
public QueryStatDto[] getSlowQueries()
getSlowQueries
in interface QueryStat
QueryStat.getSlowQueriesQueueSize()
slowest queriespublic QueryStatDto[] getPopularQueries()
getPopularQueries
in interface QueryStat
QueryStat.getPopularQueriesQueueSize()
most popular queriespublic int getPopularQueriesQueueSize()
getPopularQueriesQueueSize
in interface QueryStat
public void setPopularQueriesQueueSize(int size)
QueryStat
setPopularQueriesQueueSize
in interface QueryStat
size
- the new sizepublic void clearPopularQueriesQueue()
QueryStat
clearPopularQueriesQueue
in interface QueryStat
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.