Package org.hibernate.stat
Class StatisticsImpl
java.lang.Object
org.hibernate.stat.StatisticsImpl
- All Implemented Interfaces:
Statistics,StatisticsImplementor
Deprecated.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.StatisticsImpl(SessionFactoryImplementor sessionFactory) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Deprecated.reset all statisticsvoidDeprecated.Callback about a session being closed.voidDeprecated.Callback about a statement being closed.voidconnect()Deprecated.Callback about a connection being obtained fromConnectionProvidervoiddeleteEntity(String entityName) Deprecated.Callback about an entity being deleted.voidendTransaction(boolean success) Deprecated.Callback about a transaction completing.voidfetchCollection(String role) Deprecated.Callback to indicate a collection being fetched.voidfetchEntity(String entityName) Deprecated.Callback about an entity being fetched.voidflush()Deprecated.Callback about a flush occurringlongDeprecated.The number of prepared statements that were releasedlongDeprecated.Global number of collections fetchedlongDeprecated.Global number of collections loadedlongDeprecated.Global number of collections recreatedlongDeprecated.Global number of collections removedString[]Deprecated.Get the names of all collection rolesDeprecated.Get collection statistics per rolelongDeprecated.Global number of collections updatedlongDeprecated.Get the global number of connections asked by the sessions (the actual number of connections used may be much smaller depending whether you use a connection pool or not)longDeprecated.Get global number of entity deleteslongDeprecated.Get global number of entity fetchslongDeprecated.Get global number of entity insertslongDeprecated.Get global number of entity loadsString[]Deprecated.Get the names of all entitiesgetEntityStatistics(String entityName) Deprecated.find entity statistics per namelongDeprecated.Get global number of entity updateslongDeprecated.Get the global number of flush executed by sessions (either implicit or explicit)longDeprecated.The number of StaleObjectStateExceptions that occurredlongDeprecated.The number of prepared statements that were acquiredString[]Deprecated.Get all executed query stringslongDeprecated.Get the global number of cached queries successfully retrieved from cachelongDeprecated.Get the global number of cached queries *not* found in cachelongDeprecated.Get the global number of cacheable queries put in cachelongDeprecated.Get global number of executed querieslongDeprecated.Get the time in milliseconds of the slowest query.Deprecated.Get the query string for the slowest query.getQueryStatistics(String queryString) Deprecated.Query statistics from query string (HQL or SQL)longDeprecated.Global number of cacheable entities/collections successfully retrieved from the cachelongDeprecated.Global number of cacheable entities/collections not found in the cache and loaded from the database.longDeprecated.Global number of cacheable entities/collections put in the cacheString[]Deprecated.Get all second-level cache region namesgetSecondLevelCacheStatistics(String regionName) Deprecated.Second level cache statistics per regionlongDeprecated.Global number of sessions closedlongDeprecated.Global number of sessions openedlongDeprecated.longDeprecated.The number of transactions we know to have been successfullongDeprecated.The number of transactions we know to have completedvoidinsertEntity(String entityName) Deprecated.Callback about an entity being insertedbooleanDeprecated.Are statistics loggedvoidloadCollection(String role) Deprecated.Callback about a collection loading.voidloadEntity(String entityName) Deprecated.Callback about an entity being loaded.voidDeprecated.log in info level the main statisticsvoidDeprecated.Callback about a session being opened.voidoptimisticFailure(String entityName) Deprecated.Callback about an optimistic lock failure on an entityvoidDeprecated.Callback about a statement being prepared.voidqueryCacheHit(String hql, String regionName) Deprecated.Callback indicating a get from the query cache resulted in a hit.voidqueryCacheMiss(String hql, String regionName) Deprecated.Callback indicating a get from the query cache resulted in a miss.voidqueryCachePut(String hql, String regionName) Deprecated.Callback indicating a put into the query cache.voidqueryExecuted(String hql, int rows, long time) Deprecated.Callback indicating execution of a sql/hql queryvoidrecreateCollection(String role) Deprecated.Callback indicating a collection recreation (full deletion + full (re-)insertion).voidremoveCollection(String role) Deprecated.Callback indicating a collection removal.voidsecondLevelCacheHit(String regionName) Deprecated.Callback indicating a get from second level cache resulted in a hit.voidsecondLevelCacheMiss(String regionName) Deprecated.Callback indicating a get from second level cache resulted in a miss.voidsecondLevelCachePut(String regionName) Deprecated.Callback indicating a put into second level cache.voidsetStatisticsEnabled(boolean b) Deprecated.Enable statistics logs (this is a dynamic parameter)toString()Deprecated.voidupdateCollection(String role) Deprecated.Callback indicating a collection was updated.voidupdateEntity(String entityName) Deprecated.Callback about an entity being updated.
-
Constructor Details
-
StatisticsImpl
public StatisticsImpl()Deprecated. -
StatisticsImpl
Deprecated.
-
-
Method Details
-
clear
public void clear()Deprecated.reset all statistics- Specified by:
clearin interfaceStatistics
-
openSession
public void openSession()Deprecated.Description copied from interface:StatisticsImplementorCallback about a session being opened.- Specified by:
openSessionin interfaceStatisticsImplementor
-
closeSession
public void closeSession()Deprecated.Description copied from interface:StatisticsImplementorCallback about a session being closed.- Specified by:
closeSessionin interfaceStatisticsImplementor
-
flush
public void flush()Deprecated.Description copied from interface:StatisticsImplementorCallback about a flush occurring- Specified by:
flushin interfaceStatisticsImplementor
-
connect
public void connect()Deprecated.Description copied from interface:StatisticsImplementorCallback about a connection being obtained fromConnectionProvider- Specified by:
connectin interfaceStatisticsImplementor
-
loadEntity
Deprecated.Description copied from interface:StatisticsImplementorCallback 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:
loadEntityin interfaceStatisticsImplementor- Parameters:
entityName- The name of the entity loaded.
-
fetchEntity
Deprecated.Description copied from interface:StatisticsImplementorCallback about an entity being fetched. UnlikeStatisticsImplementor.loadEntity(java.lang.String)this indicates a separate query being performed.- Specified by:
fetchEntityin interfaceStatisticsImplementor- Parameters:
entityName- The name of the entity fetched.
-
getEntityStatistics
Deprecated.find entity statistics per name- Specified by:
getEntityStatisticsin interfaceStatistics- Parameters:
entityName- entity name- Returns:
- EntityStatistics object
-
updateEntity
Deprecated.Description copied from interface:StatisticsImplementorCallback about an entity being updated.- Specified by:
updateEntityin interfaceStatisticsImplementor- Parameters:
entityName- The name of the entity updated.
-
insertEntity
Deprecated.Description copied from interface:StatisticsImplementorCallback about an entity being inserted- Specified by:
insertEntityin interfaceStatisticsImplementor- Parameters:
entityName- The name of the entity inserted
-
deleteEntity
Deprecated.Description copied from interface:StatisticsImplementorCallback about an entity being deleted.- Specified by:
deleteEntityin interfaceStatisticsImplementor- Parameters:
entityName- The name of the entity deleted.
-
getCollectionStatistics
Deprecated.Get collection statistics per role- Specified by:
getCollectionStatisticsin interfaceStatistics- Parameters:
role- collection role- Returns:
- CollectionStatistics
-
loadCollection
Deprecated.Description copied from interface:StatisticsImplementorCallback 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:
loadCollectionin interfaceStatisticsImplementor- Parameters:
role- The collection role.
-
fetchCollection
Deprecated.Description copied from interface:StatisticsImplementorCallback to indicate a collection being fetched. UnlikeStatisticsImplementor.loadCollection(java.lang.String), this indicates a separate query was needed.- Specified by:
fetchCollectionin interfaceStatisticsImplementor- Parameters:
role- The collection role.
-
updateCollection
Deprecated.Description copied from interface:StatisticsImplementorCallback indicating a collection was updated.- Specified by:
updateCollectionin interfaceStatisticsImplementor- Parameters:
role- The collection role.
-
recreateCollection
Deprecated.Description copied from interface:StatisticsImplementorCallback indicating a collection recreation (full deletion + full (re-)insertion).- Specified by:
recreateCollectionin interfaceStatisticsImplementor- Parameters:
role- The collection role.
-
removeCollection
Deprecated.Description copied from interface:StatisticsImplementorCallback indicating a collection removal.- Specified by:
removeCollectionin interfaceStatisticsImplementor- Parameters:
role- The collection role.
-
getSecondLevelCacheStatistics
Deprecated.Second level cache statistics per region- Specified by:
getSecondLevelCacheStatisticsin interfaceStatistics- Parameters:
regionName- region name- Returns:
- SecondLevelCacheStatistics
-
secondLevelCachePut
Deprecated.Description copied from interface:StatisticsImplementorCallback indicating a put into second level cache.- Specified by:
secondLevelCachePutin interfaceStatisticsImplementor- Parameters:
regionName- The name of the cache region
-
secondLevelCacheHit
Deprecated.Description copied from interface:StatisticsImplementorCallback indicating a get from second level cache resulted in a hit.- Specified by:
secondLevelCacheHitin interfaceStatisticsImplementor- Parameters:
regionName- The name of the cache region
-
secondLevelCacheMiss
Deprecated.Description copied from interface:StatisticsImplementorCallback indicating a get from second level cache resulted in a miss.- Specified by:
secondLevelCacheMissin interfaceStatisticsImplementor- Parameters:
regionName- The name of the cache region
-
queryExecuted
Deprecated.Description copied from interface:StatisticsImplementorCallback indicating execution of a sql/hql query- Specified by:
queryExecutedin interfaceStatisticsImplementor- Parameters:
hql- The queryrows- Number of rows returnedtime- execution time
-
queryCacheHit
Deprecated.Description copied from interface:StatisticsImplementorCallback indicating a get from the query cache resulted in a hit.- Specified by:
queryCacheHitin interfaceStatisticsImplementor- Parameters:
hql- The queryregionName- The name of the cache region
-
queryCacheMiss
Deprecated.Description copied from interface:StatisticsImplementorCallback indicating a get from the query cache resulted in a miss.- Specified by:
queryCacheMissin interfaceStatisticsImplementor- Parameters:
hql- The queryregionName- The name of the cache region
-
queryCachePut
Deprecated.Description copied from interface:StatisticsImplementorCallback indicating a put into the query cache.- Specified by:
queryCachePutin interfaceStatisticsImplementor- Parameters:
hql- The queryregionName- The cache region
-
getQueryStatistics
Deprecated.Query statistics from query string (HQL or SQL)- Specified by:
getQueryStatisticsin interfaceStatistics- Parameters:
queryString- query string- Returns:
- QueryStatistics
-
getEntityDeleteCount
public long getEntityDeleteCount()Deprecated.Description copied from interface:StatisticsGet global number of entity deletes- Specified by:
getEntityDeleteCountin interfaceStatistics- Returns:
- entity deletion count
-
getEntityInsertCount
public long getEntityInsertCount()Deprecated.Description copied from interface:StatisticsGet global number of entity inserts- Specified by:
getEntityInsertCountin interfaceStatistics- Returns:
- entity insertion count
-
getEntityLoadCount
public long getEntityLoadCount()Deprecated.Description copied from interface:StatisticsGet global number of entity loads- Specified by:
getEntityLoadCountin interfaceStatistics- Returns:
- entity load (from DB)
-
getEntityFetchCount
public long getEntityFetchCount()Deprecated.Description copied from interface:StatisticsGet global number of entity fetchs- Specified by:
getEntityFetchCountin interfaceStatistics- Returns:
- entity fetch (from DB)
-
getEntityUpdateCount
public long getEntityUpdateCount()Deprecated.Description copied from interface:StatisticsGet global number of entity updates- Specified by:
getEntityUpdateCountin interfaceStatistics- Returns:
- entity update
-
getQueryExecutionCount
public long getQueryExecutionCount()Deprecated.Description copied from interface:StatisticsGet global number of executed queries- Specified by:
getQueryExecutionCountin interfaceStatistics- Returns:
- query execution count
-
getQueryCacheHitCount
public long getQueryCacheHitCount()Deprecated.Description copied from interface:StatisticsGet the global number of cached queries successfully retrieved from cache- Specified by:
getQueryCacheHitCountin interfaceStatistics
-
getQueryCacheMissCount
public long getQueryCacheMissCount()Deprecated.Description copied from interface:StatisticsGet the global number of cached queries *not* found in cache- Specified by:
getQueryCacheMissCountin interfaceStatistics
-
getQueryCachePutCount
public long getQueryCachePutCount()Deprecated.Description copied from interface:StatisticsGet the global number of cacheable queries put in cache- Specified by:
getQueryCachePutCountin interfaceStatistics
-
getFlushCount
public long getFlushCount()Deprecated.Description copied from interface:StatisticsGet the global number of flush executed by sessions (either implicit or explicit)- Specified by:
getFlushCountin interfaceStatistics- Returns:
- flush
-
getConnectCount
public long getConnectCount()Deprecated.Description copied from interface:StatisticsGet the global number of connections asked by the sessions (the actual number of connections used may be much smaller depending whether you use a connection pool or not)- Specified by:
getConnectCountin interfaceStatistics- Returns:
- session connect
-
getSecondLevelCacheHitCount
public long getSecondLevelCacheHitCount()Deprecated.Description copied from interface:StatisticsGlobal number of cacheable entities/collections successfully retrieved from the cache- Specified by:
getSecondLevelCacheHitCountin interfaceStatistics- Returns:
- second level cache hit
-
getSecondLevelCacheMissCount
public long getSecondLevelCacheMissCount()Deprecated.Description copied from interface:StatisticsGlobal number of cacheable entities/collections not found in the cache and loaded from the database.- Specified by:
getSecondLevelCacheMissCountin interfaceStatistics- Returns:
- second level cache miss
-
getSecondLevelCachePutCount
public long getSecondLevelCachePutCount()Deprecated.Description copied from interface:StatisticsGlobal number of cacheable entities/collections put in the cache- Specified by:
getSecondLevelCachePutCountin interfaceStatistics- Returns:
- second level cache put
-
getSessionCloseCount
public long getSessionCloseCount()Deprecated.Description copied from interface:StatisticsGlobal number of sessions closed- Specified by:
getSessionCloseCountin interfaceStatistics- Returns:
- session closing
-
getSessionOpenCount
public long getSessionOpenCount()Deprecated.Description copied from interface:StatisticsGlobal number of sessions opened- Specified by:
getSessionOpenCountin interfaceStatistics- Returns:
- session opening
-
getCollectionLoadCount
public long getCollectionLoadCount()Deprecated.Description copied from interface:StatisticsGlobal number of collections loaded- Specified by:
getCollectionLoadCountin interfaceStatistics- Returns:
- collection loading (from DB)
-
getCollectionFetchCount
public long getCollectionFetchCount()Deprecated.Description copied from interface:StatisticsGlobal number of collections fetched- Specified by:
getCollectionFetchCountin interfaceStatistics- Returns:
- collection fetching (from DB)
-
getCollectionUpdateCount
public long getCollectionUpdateCount()Deprecated.Description copied from interface:StatisticsGlobal number of collections updated- Specified by:
getCollectionUpdateCountin interfaceStatistics- Returns:
- collection update
-
getCollectionRemoveCount
public long getCollectionRemoveCount()Deprecated.Description copied from interface:StatisticsGlobal number of collections removed- Specified by:
getCollectionRemoveCountin interfaceStatistics- Returns:
- collection removal FIXME: even if isInverse="true"?
-
getCollectionRecreateCount
public long getCollectionRecreateCount()Deprecated.Description copied from interface:StatisticsGlobal number of collections recreated- Specified by:
getCollectionRecreateCountin interfaceStatistics- Returns:
- collection recreation
-
getStartTime
public long getStartTime()Deprecated.- Specified by:
getStartTimein interfaceStatistics- Returns:
- start time in ms (JVM standards
System.currentTimeMillis())
-
logSummary
public void logSummary()Deprecated.log in info level the main statistics- Specified by:
logSummaryin interfaceStatistics
-
isStatisticsEnabled
public boolean isStatisticsEnabled()Deprecated.Are statistics logged- Specified by:
isStatisticsEnabledin interfaceStatistics
-
setStatisticsEnabled
public void setStatisticsEnabled(boolean b) Deprecated.Enable statistics logs (this is a dynamic parameter)- Specified by:
setStatisticsEnabledin interfaceStatistics
-
getQueryExecutionMaxTime
public long getQueryExecutionMaxTime()Deprecated.Description copied from interface:StatisticsGet the time in milliseconds of the slowest query.- Specified by:
getQueryExecutionMaxTimein interfaceStatistics- Returns:
- Returns the max query execution time, for all queries
-
getQueries
Deprecated.Get all executed query strings- Specified by:
getQueriesin interfaceStatistics
-
getEntityNames
Deprecated.Get the names of all entities- Specified by:
getEntityNamesin interfaceStatistics
-
getCollectionRoleNames
Deprecated.Get the names of all collection roles- Specified by:
getCollectionRoleNamesin interfaceStatistics
-
getSecondLevelCacheRegionNames
Deprecated.Get all second-level cache region names- Specified by:
getSecondLevelCacheRegionNamesin interfaceStatistics
-
endTransaction
public void endTransaction(boolean success) Deprecated.Description copied from interface:StatisticsImplementorCallback about a transaction completing.- Specified by:
endTransactionin interfaceStatisticsImplementor- Parameters:
success- Was the transaction successful?
-
getSuccessfulTransactionCount
public long getSuccessfulTransactionCount()Deprecated.Description copied from interface:StatisticsThe number of transactions we know to have been successful- Specified by:
getSuccessfulTransactionCountin interfaceStatistics
-
getTransactionCount
public long getTransactionCount()Deprecated.Description copied from interface:StatisticsThe number of transactions we know to have completed- Specified by:
getTransactionCountin interfaceStatistics
-
closeStatement
public void closeStatement()Deprecated.Description copied from interface:StatisticsImplementorCallback about a statement being closed.- Specified by:
closeStatementin interfaceStatisticsImplementor
-
prepareStatement
public void prepareStatement()Deprecated.Description copied from interface:StatisticsImplementorCallback about a statement being prepared.- Specified by:
prepareStatementin interfaceStatisticsImplementor
-
getCloseStatementCount
public long getCloseStatementCount()Deprecated.Description copied from interface:StatisticsThe number of prepared statements that were released- Specified by:
getCloseStatementCountin interfaceStatistics
-
getPrepareStatementCount
public long getPrepareStatementCount()Deprecated.Description copied from interface:StatisticsThe number of prepared statements that were acquired- Specified by:
getPrepareStatementCountin interfaceStatistics
-
optimisticFailure
Deprecated.Description copied from interface:StatisticsImplementorCallback about an optimistic lock failure on an entity- Specified by:
optimisticFailurein interfaceStatisticsImplementor- Parameters:
entityName- The name of the entity.
-
getOptimisticFailureCount
public long getOptimisticFailureCount()Deprecated.Description copied from interface:StatisticsThe number of StaleObjectStateExceptions that occurred- Specified by:
getOptimisticFailureCountin interfaceStatistics
-
toString
Deprecated. -
getQueryExecutionMaxTimeQueryString
Deprecated.Description copied from interface:StatisticsGet the query string for the slowest query.- Specified by:
getQueryExecutionMaxTimeQueryStringin interfaceStatistics
-
ConcurrentStatisticsImplinstead