public interface

StatisticsImplementor

org.hibernate.stat.StatisticsImplementor
Known Indirect Subclasses

Class Overview

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

Summary

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

Public Methods

public abstract void closeSession ()

Callback about a session being closed.

public abstract void closeStatement ()

Callback about a statement being closed.

public abstract void connect ()

Callback about a connection being obtained from ConnectionProvider

public abstract void deleteEntity (String entityName)

Callback about an entity being deleted.

Parameters
entityName The name of the entity deleted.

public abstract void endTransaction (boolean success)

Callback about a transaction completing.

Parameters
success Was the transaction successful?

public abstract void fetchCollection (String role)

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

Parameters
role The collection role.

public abstract void fetchEntity (String entityName)

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

Parameters
entityName The name of the entity fetched.

public abstract void flush ()

Callback about a flush occurring

public abstract void insertEntity (String entityName)

Callback about an entity being inserted

Parameters
entityName The name of the entity inserted

public abstract 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.

public abstract 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.

public abstract void openSession ()

Callback about a session being opened.

public abstract void optimisticFailure (String entityName)

Callback about an optimistic lock failure on an entity

Parameters
entityName The name of the entity.

public abstract void prepareStatement ()

Callback about a statement being prepared.

public abstract 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

public abstract 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

public abstract void queryCachePut (String hql, String regionName)

Callback indicating a put into the query cache.

Parameters
hql The query
regionName The cache region

public abstract 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

public abstract void recreateCollection (String role)

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

Parameters
role The collection role.

public abstract void removeCollection (String role)

Callback indicating a collection removal.

Parameters
role The collection role.

public abstract void secondLevelCacheHit (String regionName)

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

Parameters
regionName The name of the cache region

public abstract void secondLevelCacheMiss (String regionName)

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

Parameters
regionName The name of the cache region

public abstract void secondLevelCachePut (String regionName)

Callback indicating a put into second level cache.

Parameters
regionName The name of the cache region

public abstract void updateCollection (String role)

Callback indicating a collection was updated.

Parameters
role The collection role.

public abstract void updateEntity (String entityName)

Callback about an entity being updated.

Parameters
entityName The name of the entity updated.