Package org.hibernate.stat
Interface StatisticsImplementor
- All Known Implementing Classes:
ConcurrentStatisticsImpl,StatisticsImpl
public interface StatisticsImplementor
Statistics SPI for the Hibernate core. This is essentially the "statistic collector" API, its the contract
called to collect various stats.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCallback about a session being closed.voidCallback about a statement being closed.voidconnect()Callback about a connection being obtained fromConnectionProvidervoiddeleteEntity(String entityName) Callback about an entity being deleted.voidendTransaction(boolean success) Callback about a transaction completing.voidfetchCollection(String role) Callback to indicate a collection being fetched.voidfetchEntity(String entityName) Callback about an entity being fetched.voidflush()Callback about a flush occurringvoidinsertEntity(String entityName) Callback about an entity being insertedvoidloadCollection(String role) Callback about a collection loading.voidloadEntity(String entityName) Callback about an entity being loaded.voidCallback about a session being opened.voidoptimisticFailure(String entityName) Callback about an optimistic lock failure on an entityvoidCallback about a statement being prepared.voidqueryCacheHit(String hql, String regionName) Callback indicating a get from the query cache resulted in a hit.voidqueryCacheMiss(String hql, String regionName) Callback indicating a get from the query cache resulted in a miss.voidqueryCachePut(String hql, String regionName) Callback indicating a put into the query cache.voidqueryExecuted(String hql, int rows, long time) Callback indicating execution of a sql/hql queryvoidrecreateCollection(String role) Callback indicating a collection recreation (full deletion + full (re-)insertion).voidremoveCollection(String role) Callback indicating a collection removal.voidsecondLevelCacheHit(String regionName) Callback indicating a get from second level cache resulted in a hit.voidsecondLevelCacheMiss(String regionName) Callback indicating a get from second level cache resulted in a miss.voidsecondLevelCachePut(String regionName) Callback indicating a put into second level cache.voidupdateCollection(String role) Callback indicating a collection was updated.voidupdateEntity(String entityName) Callback about an entity being updated.
-
Method Details
-
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 fromConnectionProvider -
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
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
Callback about an entity being fetched. UnlikeloadEntity(java.lang.String)this indicates a separate query being performed.- Parameters:
entityName- The name of the entity fetched.
-
updateEntity
Callback about an entity being updated.- Parameters:
entityName- The name of the entity updated.
-
insertEntity
Callback about an entity being inserted- Parameters:
entityName- The name of the entity inserted
-
deleteEntity
Callback about an entity being deleted.- Parameters:
entityName- The name of the entity deleted.
-
optimisticFailure
Callback about an optimistic lock failure on an entity- Parameters:
entityName- The name of the entity.
-
loadCollection
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
Callback to indicate a collection being fetched. UnlikeloadCollection(java.lang.String), this indicates a separate query was needed.- Parameters:
role- The collection role.
-
updateCollection
Callback indicating a collection was updated.- Parameters:
role- The collection role.
-
recreateCollection
Callback indicating a collection recreation (full deletion + full (re-)insertion).- Parameters:
role- The collection role.
-
removeCollection
Callback indicating a collection removal.- Parameters:
role- The collection role.
-
secondLevelCachePut
Callback indicating a put into second level cache.- Parameters:
regionName- The name of the cache region
-
secondLevelCacheHit
Callback indicating a get from second level cache resulted in a hit.- Parameters:
regionName- The name of the cache region
-
secondLevelCacheMiss
Callback indicating a get from second level cache resulted in a miss.- Parameters:
regionName- The name of the cache region
-
queryCachePut
Callback indicating a put into the query cache.- Parameters:
hql- The queryregionName- The cache region
-
queryCacheHit
Callback indicating a get from the query cache resulted in a hit.- Parameters:
hql- The queryregionName- The name of the cache region
-
queryCacheMiss
Callback indicating a get from the query cache resulted in a miss.- Parameters:
hql- The queryregionName- The name of the cache region
-
queryExecuted
Callback indicating execution of a sql/hql query- Parameters:
hql- The queryrows- Number of rows returnedtime- execution time
-