Package org.hibernate.stat.internal
Class StatisticsImpl
java.lang.Object
org.hibernate.stat.internal.StatisticsImpl
- All Implemented Interfaces:
Serializable
,Service
,StatisticsImplementor
,Statistics
Implementation of
Statistics
based on the java.util.concurrent
package.- See Also:
-
Field Summary
Fields inherited from interface org.hibernate.stat.Statistics
DEFAULT_QUERY_STATISTICS_MAX_SIZE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
reset all statisticsvoid
Callback about a session being closed.void
Callback about a statement being closed.void
collectionCacheHit
(NavigableRole collectionRole, String regionName) Callback indicating a get from second level cache resulted in a hit.void
collectionCacheMiss
(NavigableRole collectionRole, String regionName) Callback indicating a get from second level cache resulted in a miss.void
collectionCachePut
(NavigableRole collectionRole, String regionName) Callback indicating a put into second level cache.void
connect()
Callback about a connection being obtained fromConnectionProvider
void
deleteEntity
(String entityName) Callback about an entity being deleted.void
endTransaction
(boolean success) Callback about a transaction completing.void
entityCacheHit
(NavigableRole entityName, String regionName) Callback indicating a get from second level cache resulted in a hit.void
entityCacheMiss
(NavigableRole entityName, String regionName) Callback indicating a get from second level cache resulted in a miss.void
entityCachePut
(NavigableRole entityName, String regionName) Callback indicating a put into second level cache.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@Nullable CacheRegionStatisticsImpl
getCacheRegionStatistics
(String regionName) Obtain the statistics for either a domain data or query result cache region.long
The number of prepared statements that were released.long
The global number of collections fetched.long
The global number of collections loaded.long
The global number of collections recreatedlong
The global number of collections removed.String[]
The names of all collection roles.Obtain the statistics for the collection with the given role.long
The global number of collections updated.long
The global number of connections requested by sessions.getDomainDataRegionStatistics
(String regionName) Obtain the second-level cache statistics for the given cache region.long
The global number of entity deletes.long
The global number of entity fetches.long
The global number of entity inserts.long
The global number of entity loads.String[]
The names of all entities.getEntityStatistics
(String entityName) Obtain the statistics for the entity with the given name.long
The global number of entity updates.long
The global number of entity upserts.long
The global number of flush operations executed, including automatic (either manual or automatic).long
The global number of cached natural id lookups successfully retrieved from the cache.long
The global number of cached natural id lookups not found in the cache.long
The global number of cacheable natural id lookups put in cache.long
The global number of natural id queries executed against the database.long
The global maximum query time for natural id queries executed against the database.@Nullable String
The entity name for the maximum natural id query time.@Nullable String
The region for the maximum natural id query time.getNaturalIdStatistics
(String rootEntityName) Obtain the natural id resolution statistics for the entity type with the given name.long
The number of HibernateStaleObjectStateException
s or JPAOptimisticLockException
s that have occurred.long
The number of prepared statements that were acquired.String[]
All executed query strings.long
The global number of cached queries successfully retrieved from the cache.long
The global number of cached queries notnot found in the cache.long
The global number of cacheable queries put in cache.long
The global number of executed queries.long
The time in milliseconds of the slowest query.@Nullable String
The query string for the slowest query.long
The global number of query plans successfully retrieved from cache.long
The global number of query plans lookups not found in cache.@Nullable CacheRegionStatisticsImpl
getQueryRegionStatistics
(String regionName) Obtain the second-level cache statistics for the given query cache region.getQueryStatistics
(String queryString) Obtain the query statistics for the given query string.long
The global number of cacheable entities and collections successfully retrieved from the cache.long
The global number of cacheable entities collections not found in the cache and loaded from the database.long
The global number of cacheable entities and collections put in the cache.String[]
All second-level cache region names.long
The global number of sessions closed.long
The global number of sessions opened.If "hibernate.log_slow_query" is enabled, a map from the SQL query to the maximum execution time in milliseconds.getStart()
TheInstant
at which this instance ofStatistics
was created, or since the last timeStatistics.clear()
was called.long
The Instant.toEpochMilli() milliseconds since the initial creation of this instance, or since the last timeStatistics.clear()
was called.long
The number of transactions we know to have been successful.long
The number of transactions we know to have completed.long
The global number of timestamps successfully retrieved from cache.long
The global number of timestamp requests that were not found in the cache.long
The global number of timestamps put in cache.void
insertEntity
(String entityName) Callback about an entity being insertedboolean
Is collection of statistics enabled?void
loadCollection
(String role) Callback about a collection loading.void
loadEntity
(String entityName) Callback about an entity being loaded.void
Log the main statistics at levelINFO
.void
naturalIdCacheHit
(NavigableRole rootEntityName, String regionName) Callback indicating a get from natural id cache resulted in a hit.void
naturalIdCacheMiss
(NavigableRole rootEntityName, String regionName) Callback indicating a get from natural id cache resulted in a miss.void
naturalIdCachePut
(NavigableRole rootEntityName, String regionName) Callback indicating a put into natural id cache.void
naturalIdQueryExecuted
(String rootEntityName, long time) Callback indicating execution of a natural id queryvoid
Callback about a session being opened.void
optimisticFailure
(String entityName) Callback about an optimistic lock failure on an entityvoid
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
queryCompiled
(String hql, long microseconds) Callback indicating compilation of a sql/hql queryvoid
queryExecuted
(String hql, int rows, long time) Callback indicating execution of a sql/hql queryvoid
queryPlanCacheHit
(String query) Callback indicating a get from the query plan cache resulted in a hit.void
queryPlanCacheMiss
(String query) Callback indicating a get from the query plan cache resulted in a miss.void
recreateCollection
(String role) Callback indicating a collection recreation (full deletion + full (re-)insertion).void
removeCollection
(String role) Callback indicating a collection removal.void
setStatisticsEnabled
(boolean enabled) Enable or disable statistics collection.void
Register the execution of a slow SQL query.toString()
void
updateCollection
(String role) Callback indicating a collection was updated.void
updateEntity
(String entityName) Callback about an entity being updated.void
Callback indicating a hit to the timestamp cachevoid
Callback indicating a miss to the timestamp cachevoid
Callback indicating a put to the timestamp cachevoid
upsertEntity
(String entityName) Callback about an entity being upserted.
-
Constructor Details
-
StatisticsImpl
-
-
Method Details
-
clear
public void clear()reset all statistics- Specified by:
clear
in interfaceStatistics
-
getStart
Description copied from interface:Statistics
TheInstant
at which this instance ofStatistics
was created, or since the last timeStatistics.clear()
was called.- Specified by:
getStart
in interfaceStatistics
-
getStartTime
public long getStartTime()Description copied from interface:Statistics
The Instant.toEpochMilli() milliseconds since the initial creation of this instance, or since the last timeStatistics.clear()
was called.- Specified by:
getStartTime
in interfaceStatistics
-
isStatisticsEnabled
public boolean isStatisticsEnabled()Description copied from interface:Statistics
Is collection of statistics enabled?- Specified by:
isStatisticsEnabled
in interfaceStatistics
-
setStatisticsEnabled
public void setStatisticsEnabled(boolean enabled) Description copied from interface:Statistics
Enable or disable statistics collection.- Specified by:
setStatisticsEnabled
in interfaceStatistics
-
getEntityNames
Description copied from interface:Statistics
The names of all entities.- Specified by:
getEntityNames
in interfaceStatistics
-
getEntityStatistics
Description copied from interface:Statistics
Obtain the statistics for the entity with the given name.- Specified by:
getEntityStatistics
in interfaceStatistics
- Parameters:
entityName
- the entity name
-
getEntityLoadCount
public long getEntityLoadCount()Description copied from interface:Statistics
The global number of entity loads.- Specified by:
getEntityLoadCount
in interfaceStatistics
-
getEntityFetchCount
public long getEntityFetchCount()Description copied from interface:Statistics
The global number of entity fetches.- Specified by:
getEntityFetchCount
in interfaceStatistics
-
getEntityDeleteCount
public long getEntityDeleteCount()Description copied from interface:Statistics
The global number of entity deletes.- Specified by:
getEntityDeleteCount
in interfaceStatistics
-
getEntityInsertCount
public long getEntityInsertCount()Description copied from interface:Statistics
The global number of entity inserts.- Specified by:
getEntityInsertCount
in interfaceStatistics
-
getEntityUpdateCount
public long getEntityUpdateCount()Description copied from interface:Statistics
The global number of entity updates.- Specified by:
getEntityUpdateCount
in interfaceStatistics
-
getEntityUpsertCount
public long getEntityUpsertCount()Description copied from interface:Statistics
The global number of entity upserts.- Specified by:
getEntityUpsertCount
in interfaceStatistics
-
getOptimisticFailureCount
public long getOptimisticFailureCount()Description copied from interface:Statistics
The number of HibernateStaleObjectStateException
s or JPAOptimisticLockException
s that have occurred.- Specified by:
getOptimisticFailureCount
in interfaceStatistics
-
loadEntity
Description copied from interface:StatisticsImplementor
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.- Specified by:
loadEntity
in interfaceStatisticsImplementor
- Parameters:
entityName
- The name of the entity loaded.
-
fetchEntity
Description copied from interface:StatisticsImplementor
Callback about an entity being fetched. UnlikeStatisticsImplementor.loadEntity(java.lang.String)
this indicates a separate query being performed.- Specified by:
fetchEntity
in interfaceStatisticsImplementor
- Parameters:
entityName
- The name of the entity fetched.
-
updateEntity
Description copied from interface:StatisticsImplementor
Callback about an entity being updated.- Specified by:
updateEntity
in interfaceStatisticsImplementor
- Parameters:
entityName
- The name of the entity updated.
-
upsertEntity
Description copied from interface:StatisticsImplementor
Callback about an entity being upserted.- Specified by:
upsertEntity
in interfaceStatisticsImplementor
- Parameters:
entityName
- The name of the entity upserted.
-
insertEntity
Description copied from interface:StatisticsImplementor
Callback about an entity being inserted- Specified by:
insertEntity
in interfaceStatisticsImplementor
- Parameters:
entityName
- The name of the entity inserted
-
deleteEntity
Description copied from interface:StatisticsImplementor
Callback about an entity being deleted.- Specified by:
deleteEntity
in interfaceStatisticsImplementor
- Parameters:
entityName
- The name of the entity deleted.
-
optimisticFailure
Description copied from interface:StatisticsImplementor
Callback about an optimistic lock failure on an entity- Specified by:
optimisticFailure
in interfaceStatisticsImplementor
- Parameters:
entityName
- The name of the entity.
-
getCollectionRoleNames
Description copied from interface:Statistics
The names of all collection roles.- Specified by:
getCollectionRoleNames
in interfaceStatistics
-
getCollectionStatistics
Description copied from interface:Statistics
Obtain the statistics for the collection with the given role.- Specified by:
getCollectionStatistics
in interfaceStatistics
- Parameters:
role
- the collection role
-
getCollectionLoadCount
public long getCollectionLoadCount()Description copied from interface:Statistics
The global number of collections loaded.- Specified by:
getCollectionLoadCount
in interfaceStatistics
-
getCollectionFetchCount
public long getCollectionFetchCount()Description copied from interface:Statistics
The global number of collections fetched.- Specified by:
getCollectionFetchCount
in interfaceStatistics
-
getCollectionUpdateCount
public long getCollectionUpdateCount()Description copied from interface:Statistics
The global number of collections updated.- Specified by:
getCollectionUpdateCount
in interfaceStatistics
-
getCollectionRemoveCount
public long getCollectionRemoveCount()Description copied from interface:Statistics
The global number of collections removed.- Specified by:
getCollectionRemoveCount
in interfaceStatistics
-
getCollectionRecreateCount
public long getCollectionRecreateCount()Description copied from interface:Statistics
The global number of collections recreated- Specified by:
getCollectionRecreateCount
in interfaceStatistics
-
loadCollection
Description copied from interface:StatisticsImplementor
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.- Specified by:
loadCollection
in interfaceStatisticsImplementor
- Parameters:
role
- The collection role.
-
fetchCollection
Description copied from interface:StatisticsImplementor
Callback to indicate a collection being fetched. UnlikeStatisticsImplementor.loadCollection(java.lang.String)
, this indicates a separate query was needed.- Specified by:
fetchCollection
in interfaceStatisticsImplementor
- Parameters:
role
- The collection role.
-
updateCollection
Description copied from interface:StatisticsImplementor
Callback indicating a collection was updated.- Specified by:
updateCollection
in interfaceStatisticsImplementor
- Parameters:
role
- The collection role.
-
recreateCollection
Description copied from interface:StatisticsImplementor
Callback indicating a collection recreation (full deletion + full (re-)insertion).- Specified by:
recreateCollection
in interfaceStatisticsImplementor
- Parameters:
role
- The collection role.
-
removeCollection
Description copied from interface:StatisticsImplementor
Callback indicating a collection removal.- Specified by:
removeCollection
in interfaceStatisticsImplementor
- Parameters:
role
- The collection role.
-
getNaturalIdStatistics
Description copied from interface:Statistics
Obtain the natural id resolution statistics for the entity type with the given name.- Specified by:
getNaturalIdStatistics
in interfaceStatistics
- Parameters:
rootEntityName
- The entity name that is the root of the hierarchy containing the natural id
-
getNaturalIdQueryExecutionCount
public long getNaturalIdQueryExecutionCount()Description copied from interface:Statistics
The global number of natural id queries executed against the database.- Specified by:
getNaturalIdQueryExecutionCount
in interfaceStatistics
-
getNaturalIdQueryExecutionMaxTime
public long getNaturalIdQueryExecutionMaxTime()Description copied from interface:Statistics
The global maximum query time for natural id queries executed against the database.- Specified by:
getNaturalIdQueryExecutionMaxTime
in interfaceStatistics
-
getNaturalIdQueryExecutionMaxTimeRegion
Description copied from interface:Statistics
The region for the maximum natural id query time.- Specified by:
getNaturalIdQueryExecutionMaxTimeRegion
in interfaceStatistics
-
getNaturalIdQueryExecutionMaxTimeEntity
Description copied from interface:Statistics
The entity name for the maximum natural id query time.- Specified by:
getNaturalIdQueryExecutionMaxTimeEntity
in interfaceStatistics
-
getNaturalIdCacheHitCount
public long getNaturalIdCacheHitCount()Description copied from interface:Statistics
The global number of cached natural id lookups successfully retrieved from the cache.- Specified by:
getNaturalIdCacheHitCount
in interfaceStatistics
-
getNaturalIdCacheMissCount
public long getNaturalIdCacheMissCount()Description copied from interface:Statistics
The global number of cached natural id lookups not found in the cache.- Specified by:
getNaturalIdCacheMissCount
in interfaceStatistics
-
getNaturalIdCachePutCount
public long getNaturalIdCachePutCount()Description copied from interface:Statistics
The global number of cacheable natural id lookups put in cache.- Specified by:
getNaturalIdCachePutCount
in interfaceStatistics
-
naturalIdQueryExecuted
Description copied from interface:StatisticsImplementor
Callback indicating execution of a natural id query- Specified by:
naturalIdQueryExecuted
in interfaceStatisticsImplementor
-
getSecondLevelCacheRegionNames
Description copied from interface:Statistics
All second-level cache region names. For backwards compatibility, this method returns just the names of regions storing domain data, not query result cache regions.- Specified by:
getSecondLevelCacheRegionNames
in interfaceStatistics
-
getDomainDataRegionStatistics
Description copied from interface:Statistics
Obtain the second-level cache statistics for the given cache region.- Specified by:
getDomainDataRegionStatistics
in interfaceStatistics
- Parameters:
regionName
- The unqualified region name- Returns:
- the statistics for the named region, or
null
if the second-level cache is not enabled
-
getQueryRegionStatistics
Description copied from interface:Statistics
Obtain the second-level cache statistics for the given query cache region.- Specified by:
getQueryRegionStatistics
in interfaceStatistics
- Parameters:
regionName
- The unqualified region name- Returns:
- the statistics for the named region, or
null
if either query result caching is not enabled, or no query cache region exists with the given name
-
getCacheRegionStatistics
Description copied from interface:Statistics
Obtain the statistics for either a domain data or query result cache region.This method checks both, preferring the domain data region if there is one. Think of it as a cascading check to:
Note that null is returned instead of throwing an exception when no region exists with the given name.- Specified by:
getCacheRegionStatistics
in interfaceStatistics
- Parameters:
regionName
- The unqualified region name- Returns:
- the statistics for the named region, or
null
if there is no region with the given name
-
getSecondLevelCacheHitCount
public long getSecondLevelCacheHitCount()Description copied from interface:Statistics
The global number of cacheable entities and collections successfully retrieved from the cache.- Specified by:
getSecondLevelCacheHitCount
in interfaceStatistics
-
getSecondLevelCacheMissCount
public long getSecondLevelCacheMissCount()Description copied from interface:Statistics
The global number of cacheable entities collections not found in the cache and loaded from the database.- Specified by:
getSecondLevelCacheMissCount
in interfaceStatistics
-
getSecondLevelCachePutCount
public long getSecondLevelCachePutCount()Description copied from interface:Statistics
The global number of cacheable entities and collections put in the cache.- Specified by:
getSecondLevelCachePutCount
in interfaceStatistics
-
getUpdateTimestampsCacheHitCount
public long getUpdateTimestampsCacheHitCount()Description copied from interface:Statistics
The global number of timestamps successfully retrieved from cache.- Specified by:
getUpdateTimestampsCacheHitCount
in interfaceStatistics
-
getUpdateTimestampsCacheMissCount
public long getUpdateTimestampsCacheMissCount()Description copied from interface:Statistics
The global number of timestamp requests that were not found in the cache.- Specified by:
getUpdateTimestampsCacheMissCount
in interfaceStatistics
-
getUpdateTimestampsCachePutCount
public long getUpdateTimestampsCachePutCount()Description copied from interface:Statistics
The global number of timestamps put in cache.- Specified by:
getUpdateTimestampsCachePutCount
in interfaceStatistics
-
updateTimestampsCacheHit
public void updateTimestampsCacheHit()Description copied from interface:StatisticsImplementor
Callback indicating a hit to the timestamp cache- Specified by:
updateTimestampsCacheHit
in interfaceStatisticsImplementor
-
updateTimestampsCacheMiss
public void updateTimestampsCacheMiss()Description copied from interface:StatisticsImplementor
Callback indicating a miss to the timestamp cache- Specified by:
updateTimestampsCacheMiss
in interfaceStatisticsImplementor
-
updateTimestampsCachePut
public void updateTimestampsCachePut()Description copied from interface:StatisticsImplementor
Callback indicating a put to the timestamp cache- Specified by:
updateTimestampsCachePut
in interfaceStatisticsImplementor
-
getQueries
Description copied from interface:Statistics
All executed query strings.The maximum number of queries tracked by the Hibernate statistics is determined by the configuration property "hibernate.statistics.query_max_size".
- Specified by:
getQueries
in interfaceStatistics
- See Also:
-
getQueryStatistics
Description copied from interface:Statistics
Obtain the query statistics for the given query string.- Specified by:
getQueryStatistics
in interfaceStatistics
- Parameters:
queryString
- the query string, written in HQL or SQL
-
getQueryExecutionCount
public long getQueryExecutionCount()Description copied from interface:Statistics
The global number of executed queries.- Specified by:
getQueryExecutionCount
in interfaceStatistics
-
getQueryCacheHitCount
public long getQueryCacheHitCount()Description copied from interface:Statistics
The global number of cached queries successfully retrieved from the cache.- Specified by:
getQueryCacheHitCount
in interfaceStatistics
-
getQueryCacheMissCount
public long getQueryCacheMissCount()Description copied from interface:Statistics
The global number of cached queries notnot found in the cache.- Specified by:
getQueryCacheMissCount
in interfaceStatistics
-
getQueryCachePutCount
public long getQueryCachePutCount()Description copied from interface:Statistics
The global number of cacheable queries put in cache.- Specified by:
getQueryCachePutCount
in interfaceStatistics
-
getQueryExecutionMaxTimeQueryString
Description copied from interface:Statistics
The query string for the slowest query.- Specified by:
getQueryExecutionMaxTimeQueryString
in interfaceStatistics
-
getQueryExecutionMaxTime
public long getQueryExecutionMaxTime()Description copied from interface:Statistics
The time in milliseconds of the slowest query.- Specified by:
getQueryExecutionMaxTime
in interfaceStatistics
-
queryExecuted
Description copied from interface:StatisticsImplementor
Callback indicating execution of a sql/hql query- Specified by:
queryExecuted
in interfaceStatisticsImplementor
- Parameters:
hql
- The queryrows
- Number of rows returnedtime
- execution time
-
queryCacheHit
Description copied from interface:StatisticsImplementor
Callback indicating a get from the query cache resulted in a hit.- Specified by:
queryCacheHit
in interfaceStatisticsImplementor
- Parameters:
hql
- The queryregionName
- The name of the cache region
-
queryCacheMiss
Description copied from interface:StatisticsImplementor
Callback indicating a get from the query cache resulted in a miss.- Specified by:
queryCacheMiss
in interfaceStatisticsImplementor
- Parameters:
hql
- The queryregionName
- The name of the cache region
-
queryCachePut
Description copied from interface:StatisticsImplementor
Callback indicating a put into the query cache.- Specified by:
queryCachePut
in interfaceStatisticsImplementor
- Parameters:
hql
- The queryregionName
- The cache region
-
getQueryPlanCacheHitCount
public long getQueryPlanCacheHitCount()Description copied from interface:Statistics
The global number of query plans successfully retrieved from cache.- Specified by:
getQueryPlanCacheHitCount
in interfaceStatistics
-
getQueryPlanCacheMissCount
public long getQueryPlanCacheMissCount()Description copied from interface:Statistics
The global number of query plans lookups not found in cache.- Specified by:
getQueryPlanCacheMissCount
in interfaceStatistics
-
queryCompiled
Description copied from interface:StatisticsImplementor
Callback indicating compilation of a sql/hql query- Specified by:
queryCompiled
in interfaceStatisticsImplementor
- Parameters:
hql
- The querymicroseconds
- execution time
-
queryPlanCacheHit
Description copied from interface:StatisticsImplementor
Callback indicating a get from the query plan cache resulted in a hit.- Specified by:
queryPlanCacheHit
in interfaceStatisticsImplementor
- Parameters:
query
- The query
-
queryPlanCacheMiss
Description copied from interface:StatisticsImplementor
Callback indicating a get from the query plan cache resulted in a miss.- Specified by:
queryPlanCacheMiss
in interfaceStatisticsImplementor
- Parameters:
query
- The query
-
getSessionOpenCount
public long getSessionOpenCount()Description copied from interface:Statistics
The global number of sessions opened.- Specified by:
getSessionOpenCount
in interfaceStatistics
-
getSessionCloseCount
public long getSessionCloseCount()Description copied from interface:Statistics
The global number of sessions closed.- Specified by:
getSessionCloseCount
in interfaceStatistics
-
getFlushCount
public long getFlushCount()Description copied from interface:Statistics
The global number of flush operations executed, including automatic (either manual or automatic).- Specified by:
getFlushCount
in interfaceStatistics
-
getConnectCount
public long getConnectCount()Description copied from interface:Statistics
The global number of connections requested by sessions.The actual number of connections used may be much smaller, assuming that a connection pool is in use.
- Specified by:
getConnectCount
in interfaceStatistics
-
getSuccessfulTransactionCount
public long getSuccessfulTransactionCount()Description copied from interface:Statistics
The number of transactions we know to have been successful.- Specified by:
getSuccessfulTransactionCount
in interfaceStatistics
-
getTransactionCount
public long getTransactionCount()Description copied from interface:Statistics
The number of transactions we know to have completed.- Specified by:
getTransactionCount
in interfaceStatistics
-
getCloseStatementCount
public long getCloseStatementCount()Description copied from interface:Statistics
The number of prepared statements that were released.- Specified by:
getCloseStatementCount
in interfaceStatistics
-
getPrepareStatementCount
public long getPrepareStatementCount()Description copied from interface:Statistics
The number of prepared statements that were acquired.- Specified by:
getPrepareStatementCount
in interfaceStatistics
-
openSession
public void openSession()Description copied from interface:StatisticsImplementor
Callback about a session being opened.- Specified by:
openSession
in interfaceStatisticsImplementor
-
closeSession
public void closeSession()Description copied from interface:StatisticsImplementor
Callback about a session being closed.- Specified by:
closeSession
in interfaceStatisticsImplementor
-
flush
public void flush()Description copied from interface:StatisticsImplementor
Callback about a flush occurring- Specified by:
flush
in interfaceStatisticsImplementor
-
connect
public void connect()Description copied from interface:StatisticsImplementor
Callback about a connection being obtained fromConnectionProvider
- Specified by:
connect
in interfaceStatisticsImplementor
-
prepareStatement
public void prepareStatement()Description copied from interface:StatisticsImplementor
Callback about a statement being prepared.- Specified by:
prepareStatement
in interfaceStatisticsImplementor
-
closeStatement
public void closeStatement()Description copied from interface:StatisticsImplementor
Callback about a statement being closed.- Specified by:
closeStatement
in interfaceStatisticsImplementor
-
endTransaction
public void endTransaction(boolean success) Description copied from interface:StatisticsImplementor
Callback about a transaction completing.- Specified by:
endTransaction
in interfaceStatisticsImplementor
- Parameters:
success
- Was the transaction successful?
-
logSummary
public void logSummary()Description copied from interface:Statistics
Log the main statistics at levelINFO
.- Specified by:
logSummary
in interfaceStatistics
-
toString
-
getSlowQueries
Description copied from interface:Statistics
If "hibernate.log_slow_query" is enabled, a map from the SQL query to the maximum execution time in milliseconds.- Specified by:
getSlowQueries
in interfaceStatistics
- Specified by:
getSlowQueries
in interfaceStatisticsImplementor
- See Also:
-
slowQuery
Description copied from interface:StatisticsImplementor
Register the execution of a slow SQL query.- Specified by:
slowQuery
in interfaceStatisticsImplementor
-