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.
  • Method Details

    • 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.