org.hibernate.search.stat

## Interface Statistics

- All Known Subinterfaces:
    StatisticsInfoMBean
  All Known Implementing Classes:
    JMXRegistrar.StatisticsInfo, StatisticsImpl

      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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Reset all statistics.
    `Set<String>` | `getIndexedClassNames()` Returns a list of all indexed classes.
    `long` | `getIndexSize(String indexName)` Returns the size of the index with the given name, in bytes.
    `int` | `getNumberOfIndexedEntities(String entity)` Returns the number of documents for the given entity.
    `long` | `getObjectLoadingExecutionAvgTime()`
    `long` | `getObjectLoadingExecutionMaxTime()`
    `long` | `getObjectLoadingTotalTime()`
    `long` | `getObjectsLoadedCount()`
    `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.
    `Map<String,Long>` | `indexSizes()`
    `boolean` | `isStatisticsEnabled()`
    `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.
      Returns:
        the total search time in nanoseconds.

    - #### getSearchQueryExecutionMaxTime

          long getSearchQueryExecutionMaxTime()

      Get the time in nanoseconds of the slowest search.
      Returns:
        the time in nanoseconds of the slowest search.

    - #### getSearchQueryExecutionAvgTime

          long getSearchQueryExecutionAvgTime()

      Get the average search time in nanoseconds.
      Returns:
        the average search time in nanoseconds

    - #### getSearchQueryExecutionMaxTimeQueryString

          String getSearchQueryExecutionMaxTimeQueryString()

      Get the query string for the slowest query.
      Returns:
        the query string for the slowest query.

    - #### getObjectLoadingTotalTime

          long getObjectLoadingTotalTime()

      Returns:
        the total object loading in nanoseconds.

    - #### getObjectLoadingExecutionMaxTime

          long getObjectLoadingExecutionMaxTime()

      Returns:
        the time in nanoseconds for the slowest object load.

    - #### getObjectLoadingExecutionAvgTime

          long getObjectLoadingExecutionAvgTime()

      Returns:
        the average object loading time in nanoseconds.

    - #### getObjectsLoadedCount

          long getObjectsLoadedCount()

      Returns:
        the total number of objects loaded

    - #### isStatisticsEnabled

          boolean isStatisticsEnabled()

      Returns:
        `true` if statistics are enabled, `false` otherwise

    - #### setStatisticsEnabled

          void setStatisticsEnabled(boolean b)

      Enable statistics logs (this is a dynamic parameter)
      Parameters:
        `b` - if `true`, it enables the statistics.

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

    - #### getIndexSize

          long getIndexSize(String indexName)

      Returns the size of the index with the given name, in bytes.
      Parameters:
        `indexName` - the index name (which may differ from the entity name, depending on configuration settings)
      Returns:
        the size of the given index, in bytes
      Throws:
        `IllegalArgumentException` - in case the index name is not valid

    - #### indexSizes

          Map<String,Long> indexSizes()

      Returns:
        a map of all index names and the size of the corresponding index, in bytes. The map key is the index name (which may differ from the entity name, depending on configuration settings).

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved