org.hibernate.search.jmx
Class StatisticsInfo

java.lang.Object
  extended by org.hibernate.search.jmx.StatisticsInfo
All Implemented Interfaces:
StatisticsInfoMBean, Statistics

public class StatisticsInfo
extends Object
implements StatisticsInfoMBean

Author:
Hardy Ferentschik

Field Summary
 
Fields inherited from interface org.hibernate.search.jmx.StatisticsInfoMBean
STATISTICS_MBEAN_OBJECT_NAME
 
Constructor Summary
StatisticsInfo(Statistics delegate)
           
 
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)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatisticsInfo

public StatisticsInfo(Statistics delegate)
Method Detail

clear

public void clear()
Description copied from interface: Statistics
Reset all statistics.

Specified by:
clear in interface Statistics

getSearchQueryExecutionCount

public long getSearchQueryExecutionCount()
Description copied from interface: Statistics
Get global number of executed search queries

Specified by:
getSearchQueryExecutionCount in interface Statistics
Returns:
search query execution count

getSearchQueryTotalTime

public long getSearchQueryTotalTime()
Description copied from interface: Statistics
Get the total search time in nanoseconds.

Specified by:
getSearchQueryTotalTime in interface Statistics

getSearchQueryExecutionMaxTime

public long getSearchQueryExecutionMaxTime()
Description copied from interface: Statistics
Get the time in nanoseconds of the slowest search.

Specified by:
getSearchQueryExecutionMaxTime in interface Statistics

getSearchQueryExecutionAvgTime

public long getSearchQueryExecutionAvgTime()
Description copied from interface: Statistics
Get the average search time in nanoseconds.

Specified by:
getSearchQueryExecutionAvgTime in interface Statistics

getSearchQueryExecutionMaxTimeQueryString

public String getSearchQueryExecutionMaxTimeQueryString()
Description copied from interface: Statistics
Get the query string for the slowest query.

Specified by:
getSearchQueryExecutionMaxTimeQueryString in interface Statistics

getObjectLoadingTotalTime

public long getObjectLoadingTotalTime()
Description copied from interface: Statistics
Get the total object loading in nanoseconds.

Specified by:
getObjectLoadingTotalTime in interface Statistics

getObjectLoadingExecutionMaxTime

public long getObjectLoadingExecutionMaxTime()
Description copied from interface: Statistics
Get the time in nanoseconds for the slowest object load.

Specified by:
getObjectLoadingExecutionMaxTime in interface Statistics

getObjectLoadingExecutionAvgTime

public long getObjectLoadingExecutionAvgTime()
Description copied from interface: Statistics
Get the average object loading time in nanoseconds.

Specified by:
getObjectLoadingExecutionAvgTime in interface Statistics

getObjectsLoadedCount

public long getObjectsLoadedCount()
Description copied from interface: Statistics
Gets the total number of objects loaded

Specified by:
getObjectsLoadedCount in interface Statistics

isStatisticsEnabled

public boolean isStatisticsEnabled()
Description copied from interface: Statistics
Are statistics logged

Specified by:
isStatisticsEnabled in interface Statistics

setStatisticsEnabled

public void setStatisticsEnabled(boolean b)
Description copied from interface: Statistics
Enable statistics logs (this is a dynamic parameter)

Specified by:
setStatisticsEnabled in interface Statistics

getSearchVersion

public String getSearchVersion()
Description copied from interface: Statistics
Returns the Hibernate Search version.

Specified by:
getSearchVersion in interface Statistics
Returns:
the Hibernate Search version

getIndexedClassNames

public Set<String> getIndexedClassNames()
Description copied from interface: Statistics
Returns a list of all indexed classes.

Specified by:
getIndexedClassNames in interface Statistics
Returns:
list of all indexed classes

getNumberOfIndexedEntities

public int getNumberOfIndexedEntities(String entity)
Description copied from interface: Statistics
Returns the number of documents for the given entity.

Specified by:
getNumberOfIndexedEntities in interface Statistics
Parameters:
entity - the fqc of the entity
Returns:
number of documents for the specified entity name

indexedEntitiesCount

public Map<String,Integer> indexedEntitiesCount()
Description copied from interface: Statistics
Returns a map of all indexed entities and their document count in the index.

Specified by:
indexedEntitiesCount in interface Statistics
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-2012 Red Hat Middleware, LLC. All Rights Reserved