org.hibernate.search.stat
Interface Statistics

All Known Subinterfaces:
StatisticsInfoMBean
All Known Implementing Classes:
StatisticsImpl, StatisticsInfo

public interface Statistics

Interface which defines several methods allowing to access statistical data. This includes average and maximum Lucene query time and object loading time.

Author:
Hardy Ferentschik

Method Summary
 void clear()
          Reset all statistics.
 Set<String> getIndexedClassNames()
          Returns a list of all indexed classes.
 int getNumberOfIndexedEntities(String entity)
          Returns the number of documents for the given entity.
 long getObjectLoadingExecutionAvgTime()
          Get the average object loading time in nanoseconds.
 long getObjectLoadingExecutionMaxTime()
          Get the time in nanoseconds for the slowest object load.
 long getObjectLoadingTotalTime()
          Get the total object loading in nanoseconds.
 long getObjectsLoadedCount()
          Gets the total number of objects loaded
 long getSearchQueryExecutionAvgTime()
          Get the average search time in nanoseconds.
 long getSearchQueryExecutionCount()
          Get global number of executed search queries
 long getSearchQueryExecutionMaxTime()
          Get the time in nanoseconds of the slowest search.
 String getSearchQueryExecutionMaxTimeQueryString()
          Get the query string for the slowest query.
 long getSearchQueryTotalTime()
          Get the total search time in nanoseconds.
 String getSearchVersion()
          Returns the Hibernate Search version.
 Map<String,Integer> indexedEntitiesCount()
          Returns a map of all indexed entities and their document count in the index.
 boolean isStatisticsEnabled()
          Are statistics logged
 void setStatisticsEnabled(boolean b)
          Enable statistics logs (this is a dynamic parameter)
 

Method Detail

clear

void clear()
Reset all statistics.


getSearchQueryExecutionCount

long getSearchQueryExecutionCount()
Get global number of executed search queries

Returns:
search query execution count

getSearchQueryTotalTime

long getSearchQueryTotalTime()
Get the total search time in nanoseconds.


getSearchQueryExecutionMaxTime

long getSearchQueryExecutionMaxTime()
Get the time in nanoseconds of the slowest search.


getSearchQueryExecutionAvgTime

long getSearchQueryExecutionAvgTime()
Get the average search time in nanoseconds.


getSearchQueryExecutionMaxTimeQueryString

String getSearchQueryExecutionMaxTimeQueryString()
Get the query string for the slowest query.


getObjectLoadingTotalTime

long getObjectLoadingTotalTime()
Get the total object loading in nanoseconds.


getObjectLoadingExecutionMaxTime

long getObjectLoadingExecutionMaxTime()
Get the time in nanoseconds for the slowest object load.


getObjectLoadingExecutionAvgTime

long getObjectLoadingExecutionAvgTime()
Get the average object loading time in nanoseconds.


getObjectsLoadedCount

long getObjectsLoadedCount()
Gets the total number of objects loaded


isStatisticsEnabled

boolean isStatisticsEnabled()
Are statistics logged


setStatisticsEnabled

void setStatisticsEnabled(boolean b)
Enable statistics logs (this is a dynamic parameter)


getSearchVersion

String getSearchVersion()
Returns the Hibernate Search version.

Returns:
the Hibernate Search version

getIndexedClassNames

Set<String> getIndexedClassNames()
Returns a list of all indexed classes.

Returns:
list of all indexed classes

getNumberOfIndexedEntities

int getNumberOfIndexedEntities(String entity)
Returns the number of documents for the given entity.

Parameters:
entity - the fqc of the entity
Returns:
number of documents for the specified entity name
Throws:
IllegalArgumentException - in case the entity name is not valid

indexedEntitiesCount

Map<String,Integer> indexedEntitiesCount()
Returns a map of all indexed entities and their document count in the index.

Returns:
a map of all indexed entities and their document count. The map key is the fqc of the entity and the map value is the document count.


Copyright © 2006-2013 Red Hat Middleware, LLC. All Rights Reserved