Package org.hibernate.stat.spi
Interface StatisticsImplementor
-
- All Superinterfaces:
java.io.Serializable,Service,Statistics
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.
-
-
Field Summary
-
Fields inherited from interface org.hibernate.stat.Statistics
DEFAULT_QUERY_STATISTICS_MAX_SIZE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidcloseSession()Callback about a session being closed.voidcloseStatement()Callback about a statement being closed.voidcollectionCacheHit(NavigableRole collectionRole, java.lang.String regionName)Callback indicating a get from second level cache resulted in a hit.voidcollectionCacheMiss(NavigableRole collectionRole, java.lang.String regionName)Callback indicating a get from second level cache resulted in a miss.voidcollectionCachePut(NavigableRole collectionRole, java.lang.String regionName)Callback indicating a put into second level cache.voidconnect()Callback about a connection being obtained fromConnectionProvidervoiddeleteEntity(java.lang.String entityName)Callback about an entity being deleted.voidendTransaction(boolean success)Callback about a transaction completing.voidentityCacheHit(NavigableRole entityName, java.lang.String regionName)Callback indicating a get from second level cache resulted in a hit.voidentityCacheMiss(NavigableRole entityName, java.lang.String regionName)Callback indicating a get from second level cache resulted in a miss.voidentityCachePut(NavigableRole entityName, java.lang.String regionName)Callback indicating a put into second level cache.voidfetchCollection(java.lang.String role)Callback to indicate a collection being fetched.voidfetchEntity(java.lang.String entityName)Callback about an entity being fetched.voidflush()Callback about a flush occurringvoidinsertEntity(java.lang.String entityName)Callback about an entity being insertedvoidloadCollection(java.lang.String role)Callback about a collection loading.voidloadEntity(java.lang.String entityName)Callback about an entity being loaded.voidnaturalIdCacheHit(NavigableRole rootEntityName, java.lang.String regionName)Callback indicating a get from natural id cache resulted in a hit.voidnaturalIdCacheMiss(NavigableRole rootEntityName, java.lang.String regionName)Callback indicating a get from natural id cache resulted in a miss.voidnaturalIdCachePut(NavigableRole rootEntityName, java.lang.String regionName)Callback indicating a put into natural id cache.voidnaturalIdQueryExecuted(java.lang.String rootEntityName, long executionTime)Callback indicating execution of a natural id queryvoidopenSession()Callback about a session being opened.voidoptimisticFailure(java.lang.String entityName)Callback about an optimistic lock failure on an entityvoidprepareStatement()Callback about a statement being prepared.voidqueryCacheHit(java.lang.String hql, java.lang.String regionName)Callback indicating a get from the query cache resulted in a hit.voidqueryCacheMiss(java.lang.String hql, java.lang.String regionName)Callback indicating a get from the query cache resulted in a miss.voidqueryCachePut(java.lang.String hql, java.lang.String regionName)Callback indicating a put into the query cache.default voidqueryCompiled(java.lang.String hql, long microseconds)Callback indicating compilation of a sql/hql queryvoidqueryExecuted(java.lang.String hql, int rows, long time)Callback indicating execution of a sql/hql querydefault voidqueryPlanCacheHit(java.lang.String query)Callback indicating a get from the query plan cache resulted in a hit.default voidqueryPlanCacheMiss(java.lang.String query)Callback indicating a get from the query plan cache resulted in a miss.voidrecreateCollection(java.lang.String role)Callback indicating a collection recreation (full deletion + full (re-)insertion).voidremoveCollection(java.lang.String role)Callback indicating a collection removal.voidupdateCollection(java.lang.String role)Callback indicating a collection was updated.voidupdateEntity(java.lang.String entityName)Callback about an entity being updated.voidupdateTimestampsCacheHit()Callback indicating a hit to the timestamp cachevoidupdateTimestampsCacheMiss()Callback indicating a miss to the timestamp cachevoidupdateTimestampsCachePut()Callback indicating a put to the timestamp cache-
Methods inherited from interface org.hibernate.stat.Statistics
clear, getCacheRegionStatistics, getCloseStatementCount, getCollectionFetchCount, getCollectionLoadCount, getCollectionRecreateCount, getCollectionRemoveCount, getCollectionRoleNames, getCollectionStatistics, getCollectionUpdateCount, getConnectCount, getDomainDataRegionStatistics, getEntityDeleteCount, getEntityFetchCount, getEntityInsertCount, getEntityLoadCount, getEntityNames, getEntityStatistics, getEntityUpdateCount, getFlushCount, getNaturalIdCacheHitCount, getNaturalIdCacheMissCount, getNaturalIdCachePutCount, getNaturalIdCacheStatistics, getNaturalIdQueryExecutionCount, getNaturalIdQueryExecutionMaxTime, getNaturalIdQueryExecutionMaxTimeEntity, getNaturalIdQueryExecutionMaxTimeRegion, getNaturalIdStatistics, getOptimisticFailureCount, getPrepareStatementCount, getQueries, getQueryCacheHitCount, getQueryCacheMissCount, getQueryCachePutCount, getQueryExecutionCount, getQueryExecutionMaxTime, getQueryExecutionMaxTimeQueryString, getQueryPlanCacheHitCount, getQueryPlanCacheMissCount, getQueryRegionStatistics, 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 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
void loadEntity(java.lang.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(java.lang.String entityName)
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
void updateEntity(java.lang.String entityName)
Callback about an entity being updated.- Parameters:
entityName- The name of the entity updated.
-
insertEntity
void insertEntity(java.lang.String entityName)
Callback about an entity being inserted- Parameters:
entityName- The name of the entity inserted
-
deleteEntity
void deleteEntity(java.lang.String entityName)
Callback about an entity being deleted.- Parameters:
entityName- The name of the entity deleted.
-
optimisticFailure
void optimisticFailure(java.lang.String entityName)
Callback about an optimistic lock failure on an entity- Parameters:
entityName- The name of the entity.
-
loadCollection
void loadCollection(java.lang.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(java.lang.String role)
Callback to indicate a collection being fetched. UnlikeloadCollection(java.lang.String), this indicates a separate query was needed.- Parameters:
role- The collection role.
-
updateCollection
void updateCollection(java.lang.String role)
Callback indicating a collection was updated.- Parameters:
role- The collection role.
-
recreateCollection
void recreateCollection(java.lang.String role)
Callback indicating a collection recreation (full deletion + full (re-)insertion).- Parameters:
role- The collection role.
-
removeCollection
void removeCollection(java.lang.String role)
Callback indicating a collection removal.- Parameters:
role- The collection role.
-
entityCachePut
void entityCachePut(NavigableRole entityName, java.lang.String regionName)
Callback indicating a put into second level cache.
-
entityCacheHit
void entityCacheHit(NavigableRole entityName, java.lang.String regionName)
Callback indicating a get from second level cache resulted in a hit.
-
entityCacheMiss
void entityCacheMiss(NavigableRole entityName, java.lang.String regionName)
Callback indicating a get from second level cache resulted in a miss.
-
collectionCachePut
void collectionCachePut(NavigableRole collectionRole, java.lang.String regionName)
Callback indicating a put into second level cache.- Parameters:
collectionRole- The collection's "path"regionName- The name of the cache region
-
collectionCacheHit
void collectionCacheHit(NavigableRole collectionRole, java.lang.String regionName)
Callback indicating a get from second level cache resulted in a hit.- Parameters:
collectionRole- The collection's "path"regionName- The name of the cache region
-
collectionCacheMiss
void collectionCacheMiss(NavigableRole collectionRole, java.lang.String regionName)
Callback indicating a get from second level cache resulted in a miss.- Parameters:
collectionRole- The collection's "path"regionName- The name of the cache region
-
naturalIdCachePut
void naturalIdCachePut(NavigableRole rootEntityName, java.lang.String regionName)
Callback indicating a put into natural id cache.
-
naturalIdCacheHit
void naturalIdCacheHit(NavigableRole rootEntityName, java.lang.String regionName)
Callback indicating a get from natural id cache resulted in a hit.
-
naturalIdCacheMiss
void naturalIdCacheMiss(NavigableRole rootEntityName, java.lang.String regionName)
Callback indicating a get from natural id cache resulted in a miss.
-
naturalIdQueryExecuted
void naturalIdQueryExecuted(java.lang.String rootEntityName, long executionTime)Callback indicating execution of a natural id query
-
queryCachePut
void queryCachePut(java.lang.String hql, java.lang.String regionName)Callback indicating a put into the query cache.- Parameters:
hql- The queryregionName- The cache region
-
queryCacheHit
void queryCacheHit(java.lang.String hql, java.lang.String regionName)Callback indicating a get from the query cache resulted in a hit.- Parameters:
hql- The queryregionName- The name of the cache region
-
queryCacheMiss
void queryCacheMiss(java.lang.String hql, java.lang.String regionName)Callback indicating a get from the query cache resulted in a miss.- Parameters:
hql- The queryregionName- The name of the cache region
-
queryExecuted
void queryExecuted(java.lang.String hql, int rows, long time)Callback indicating execution of a sql/hql query- Parameters:
hql- The queryrows- Number of rows returnedtime- 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
-
queryPlanCacheHit
default void queryPlanCacheHit(java.lang.String query)
Callback indicating a get from the query plan cache resulted in a hit.- Parameters:
query- The query
-
queryPlanCacheMiss
default void queryPlanCacheMiss(java.lang.String query)
Callback indicating a get from the query plan cache resulted in a miss.- Parameters:
query- The query
-
queryCompiled
default void queryCompiled(java.lang.String hql, long microseconds)Callback indicating compilation of a sql/hql query- Parameters:
hql- The querymicroseconds- execution time
-
-