org.apache.jackrabbit.stats
Class QueryStatImpl

java.lang.Object
  extended by org.apache.jackrabbit.stats.QueryStatImpl
All Implemented Interfaces:
org.apache.jackrabbit.api.stats.QueryStat, QueryStatCore

public class QueryStatImpl
extends Object
implements QueryStatCore

Default QueryStatCore implementation


Constructor Summary
QueryStatImpl()
           
 
Method Summary
 void clearPopularQueriesQueue()
           
 void clearSlowQueriesQueue()
           
 org.apache.jackrabbit.api.stats.QueryStatDto[] getPopularQueries()
           
 int getPopularQueriesQueueSize()
           
 org.apache.jackrabbit.api.stats.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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryStatImpl

public QueryStatImpl()
Method Detail

getSlowQueriesQueueSize

public int getSlowQueriesQueueSize()
Specified by:
getSlowQueriesQueueSize in interface org.apache.jackrabbit.api.stats.QueryStat

setSlowQueriesQueueSize

public void setSlowQueriesQueueSize(int size)
Specified by:
setSlowQueriesQueueSize in interface org.apache.jackrabbit.api.stats.QueryStat

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface org.apache.jackrabbit.api.stats.QueryStat

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface org.apache.jackrabbit.api.stats.QueryStat

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 interface QueryStatCore
Parameters:
language - the query language, see org.apache.jackrabbit.spi.commons.name.NameConstants#JCR_LANGUAGE
statement - the query
durationMs - time in ms

clearSlowQueriesQueue

public void clearSlowQueriesQueue()
Specified by:
clearSlowQueriesQueue in interface org.apache.jackrabbit.api.stats.QueryStat

getSlowQueries

public org.apache.jackrabbit.api.stats.QueryStatDto[] getSlowQueries()
Specified by:
getSlowQueries in interface org.apache.jackrabbit.api.stats.QueryStat

getPopularQueries

public org.apache.jackrabbit.api.stats.QueryStatDto[] getPopularQueries()
Specified by:
getPopularQueries in interface org.apache.jackrabbit.api.stats.QueryStat

getPopularQueriesQueueSize

public int getPopularQueriesQueueSize()
Specified by:
getPopularQueriesQueueSize in interface org.apache.jackrabbit.api.stats.QueryStat

setPopularQueriesQueueSize

public void setPopularQueriesQueueSize(int size)
Specified by:
setPopularQueriesQueueSize in interface org.apache.jackrabbit.api.stats.QueryStat

clearPopularQueriesQueue

public void clearPopularQueriesQueue()
Specified by:
clearPopularQueriesQueue in interface org.apache.jackrabbit.api.stats.QueryStat

reset

public void reset()
Specified by:
reset in interface org.apache.jackrabbit.api.stats.QueryStat


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.