## org.hibernate.stat.spi
Interface StatisticsImplementor

All Superinterfaces:
  Serializable, Service, Statistics

All Known Implementing Classes:
  ConcurrentStatisticsImpl

    public interface StatisticsImplementor

extends Statistics, Service

Statistics SPI for the Hibernate core. This is essentially the "statistic collector" API, its the contract called to collect various stats.

Method Summary
`void` `closeSession()` Callback about a session being closed.
`void` `closeStatement()` Callback about a statement being closed.
`void` `connect()` Callback about a connection being obtained from `ConnectionProvider`
`void` `deleteEntity(String entityName)` Callback about an entity being deleted.
`void` `endTransaction(boolean success)` Callback about a transaction completing.
`void` `fetchCollection(String role)` Callback to indicate a collection being fetched.
`void` `fetchEntity(String entityName)` Callback about an entity being fetched.
`void` `flush()` Callback about a flush occurring
`void` `insertEntity(String entityName)` Callback about an entity being inserted
`void` `loadCollection(String role)` Callback about a collection loading.
`void` `loadEntity(String entityName)` Callback about an entity being loaded.
`void` `naturalIdCacheHit(String regionName)` Callback indicating a get from natural id cache resulted in a hit.
`void` `naturalIdCacheMiss(String regionName)` Callback indicating a get from natural id cache resulted in a miss.
`void` `naturalIdCachePut(String regionName)` Callback indicating a put into natural id cache.
`void` `naturalIdQueryExecuted(String regionName, long time)` Callback indicating execution of a natural id query
`void` `openSession()` Callback about a session being opened.
`void` `optimisticFailure(String entityName)` Callback about an optimistic lock failure on an entity
`void` `prepareStatement()` Callback about a statement being prepared.
`void` `queryCacheHit(String hql, String regionName)` Callback indicating a get from the query cache resulted in a hit.
`void` `queryCacheMiss(String hql, String regionName)` Callback indicating a get from the query cache resulted in a miss.
`void` `queryCachePut(String hql, String regionName)` Callback indicating a put into the query cache.
`void` `queryExecuted(String hql, int rows, long time)` Callback indicating execution of a sql/hql query
`void` `recreateCollection(String role)` Callback indicating a collection recreation (full deletion + full (re-)insertion).
`void` `removeCollection(String role)` Callback indicating a collection removal.
`void` `secondLevelCacheHit(String regionName)` Callback indicating a get from second level cache resulted in a hit.
`void` `secondLevelCacheMiss(String regionName)` Callback indicating a get from second level cache resulted in a miss.
`void` `secondLevelCachePut(String regionName)` Callback indicating a put into second level cache.
`void` `updateCollection(String role)` Callback indicating a collection was updated.
`void` `updateEntity(String entityName)` Callback about an entity being updated.
`void` `updateTimestampsCacheHit()` Callback indicating a hit to the timestamp cache
`void` `updateTimestampsCacheMiss()` Callback indicating a miss to the timestamp cache
`void` `updateTimestampsCachePut()` Callback indicating a put to the timestamp cache

Methods inherited from interface org.hibernate.stat.Statistics

`clear, getCloseStatementCount, getCollectionFetchCount, getCollectionLoadCount, getCollectionRecreateCount, getCollectionRemoveCount, getCollectionRoleNames, getCollectionStatistics, getCollectionUpdateCount, getConnectCount, getEntityDeleteCount, getEntityFetchCount, getEntityInsertCount, getEntityLoadCount, getEntityNames, getEntityStatistics, getEntityUpdateCount, getFlushCount, getNaturalIdCacheHitCount, getNaturalIdCacheMissCount, getNaturalIdCachePutCount, getNaturalIdCacheStatistics, getNaturalIdQueryExecutionCount, getNaturalIdQueryExecutionMaxTime, getNaturalIdQueryExecutionMaxTimeRegion, getOptimisticFailureCount, getPrepareStatementCount, getQueries, getQueryCacheHitCount, getQueryCacheMissCount, getQueryCachePutCount, getQueryExecutionCount, getQueryExecutionMaxTime, getQueryExecutionMaxTimeQueryString, getQueryStatistics, getSecondLevelCacheHitCount, getSecondLevelCacheMissCount, getSecondLevelCachePutCount, getSecondLevelCacheRegionNames, getSecondLevelCacheStatistics, getSessionCloseCount, getSessionOpenCount, getStartTime, getSuccessfulTransactionCount, getTransactionCount, getUpdateTimestampsCacheHitCount, getUpdateTimestampsCacheMissCount, getUpdateTimestampsCachePutCount, isStatisticsEnabled, logSummary, setStatisticsEnabled`

Method Detail

### openSession

    void openSession()

  Callback about a session being opened.

### closeSession

    void closeSession()

  Callback about a session being closed.

### flush

    void flush()

  Callback about a flush occurring

### connect

    void connect()

  Callback about a connection being obtained from `ConnectionProvider`

### prepareStatement

    void prepareStatement()

  Callback about a statement being prepared.

### closeStatement

    void closeStatement()

  Callback about a statement being closed.

### endTransaction

    void endTransaction(boolean success)

  Callback about a transaction completing.

  Parameters:
    `success` - Was the transaction successful?

### loadEntity

    void loadEntity(String entityName)

  Callback about an entity being loaded. This might indicate a proxy or a fully initialized entity, but in either case it means without a separate SQL query being needed.

  Parameters:
    `entityName` - The name of the entity loaded.

### fetchEntity

    void fetchEntity(String entityName)

  Callback about an entity being fetched. Unlike `loadEntity(java.lang.String)` this indicates a separate query being performed.

  Parameters:
    `entityName` - The name of the entity fetched.

### updateEntity

    void updateEntity(String entityName)

  Callback about an entity being updated.

  Parameters:
    `entityName` - The name of the entity updated.

### insertEntity

    void insertEntity(String entityName)

  Callback about an entity being inserted

  Parameters:
    `entityName` - The name of the entity inserted

### deleteEntity

    void deleteEntity(String entityName)

  Callback about an entity being deleted.

  Parameters:
    `entityName` - The name of the entity deleted.

### optimisticFailure

    void optimisticFailure(String entityName)

  Callback about an optimistic lock failure on an entity

  Parameters:
    `entityName` - The name of the entity.

### loadCollection

    void loadCollection(String role)

  Callback about a collection loading. This might indicate a lazy collection or an initialized collection being created, but in either case it means without a separate SQL query being needed.

  Parameters:
    `role` - The collection role.

### fetchCollection

    void fetchCollection(String role)

  Callback to indicate a collection being fetched. Unlike `loadCollection(java.lang.String)`, this indicates a separate query was needed.

  Parameters:
    `role` - The collection role.

### updateCollection

    void updateCollection(String role)

  Callback indicating a collection was updated.

  Parameters:
    `role` - The collection role.

### recreateCollection

    void recreateCollection(String role)

  Callback indicating a collection recreation (full deletion + full (re-)insertion).

  Parameters:
    `role` - The collection role.

### removeCollection

    void removeCollection(String role)

  Callback indicating a collection removal.

  Parameters:
    `role` - The collection role.

### secondLevelCachePut

    void secondLevelCachePut(String regionName)

  Callback indicating a put into second level cache.

  Parameters:
    `regionName` - The name of the cache region

### secondLevelCacheHit

    void secondLevelCacheHit(String regionName)

  Callback indicating a get from second level cache resulted in a hit.

  Parameters:
    `regionName` - The name of the cache region

### secondLevelCacheMiss

    void secondLevelCacheMiss(String regionName)

  Callback indicating a get from second level cache resulted in a miss.

  Parameters:
    `regionName` - The name of the cache region

### naturalIdCachePut

    void naturalIdCachePut(String regionName)

  Callback indicating a put into natural id cache.

  Parameters:
    `regionName` - The name of the cache region

### naturalIdCacheHit

    void naturalIdCacheHit(String regionName)

  Callback indicating a get from natural id cache resulted in a hit.

  Parameters:
    `regionName` - The name of the cache region

### naturalIdCacheMiss

    void naturalIdCacheMiss(String regionName)

  Callback indicating a get from natural id cache resulted in a miss.

  Parameters:
    `regionName` - The name of the cache region

### naturalIdQueryExecuted

    void naturalIdQueryExecuted(String regionName,
                                long time)

  Callback indicating execution of a natural id query

  Parameters:
    `regionName` - The name of the cache region
    `time` - execution time

### queryCachePut

    void queryCachePut(String hql,
                       String regionName)

  Callback indicating a put into the query cache.

  Parameters:
    `hql` - The query
    `regionName` - The cache region

### queryCacheHit

    void queryCacheHit(String hql,
                       String regionName)

  Callback indicating a get from the query cache resulted in a hit.

  Parameters:
    `hql` - The query
    `regionName` - The name of the cache region

### queryCacheMiss

    void queryCacheMiss(String hql,
                        String regionName)

  Callback indicating a get from the query cache resulted in a miss.

  Parameters:
    `hql` - The query
    `regionName` - The name of the cache region

### queryExecuted

    void queryExecuted(String hql,
                       int rows,
                       long time)

  Callback indicating execution of a sql/hql query

  Parameters:
    `hql` - The query
    `rows` - Number of rows returned
    `time` - execution time

### updateTimestampsCacheHit

    void updateTimestampsCacheHit()

  Callback indicating a hit to the timestamp cache

### updateTimestampsCacheMiss

    void updateTimestampsCacheMiss()

  Callback indicating a miss to the timestamp cache

### updateTimestampsCachePut

    void updateTimestampsCachePut()

  Callback indicating a put to the timestamp cache

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.