public class ConcurrentStatisticsImpl extends Object implements StatisticsImplementor, Service
Statistics based on the java.util.concurrent package.| Constructor and Description |
|---|
ConcurrentStatisticsImpl() |
ConcurrentStatisticsImpl(SessionFactoryImplementor sessionFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
reset all statistics
|
void |
closeSession()
Callback about a session being closed.
|
void |
closeStatement()
Callback about a statement being closed.
|
void |
connect()
Callback about a connection being obtained from
ConnectionProvider |
void |
deleteEntity(String entityName)
Callback about an entity being deleted.
|
void |
endTransaction(boolean success)
Callback about a transaction completing.
|
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
|
long |
getCloseStatementCount()
The number of prepared statements that were released
|
long |
getCollectionFetchCount()
Global number of collections fetched
|
long |
getCollectionLoadCount()
Global number of collections loaded
|
long |
getCollectionRecreateCount()
Global number of collections recreated
|
long |
getCollectionRemoveCount()
Global number of collections removed
|
String[] |
getCollectionRoleNames()
Get the names of all collection roles
|
CollectionStatistics |
getCollectionStatistics(String role)
Get collection statistics per role
|
long |
getCollectionUpdateCount()
Global number of collections updated
|
long |
getConnectCount()
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)
|
long |
getEntityDeleteCount()
Get global number of entity deletes
|
long |
getEntityFetchCount()
Get global number of entity fetchs
|
long |
getEntityInsertCount()
Get global number of entity inserts
|
long |
getEntityLoadCount()
Get global number of entity loads
|
String[] |
getEntityNames()
Get the names of all entities
|
EntityStatistics |
getEntityStatistics(String entityName)
find entity statistics per name
|
long |
getEntityUpdateCount()
Get global number of entity updates
|
long |
getFlushCount()
Get the global number of flush executed by sessions (either implicit or explicit)
|
long |
getNaturalIdCacheHitCount()
Get the global number of cached naturalId lookups successfully retrieved from cache
|
long |
getNaturalIdCacheMissCount()
Get the global number of cached naturalId lookups *not* found in cache
|
long |
getNaturalIdCachePutCount()
Get the global number of cacheable naturalId lookups put in cache
|
NaturalIdCacheStatistics |
getNaturalIdCacheStatistics(String regionName)
Natural id cache statistics per region
|
long |
getNaturalIdQueryExecutionCount()
Get the global number of naturalId queries executed against the database
|
long |
getNaturalIdQueryExecutionMaxTime()
Get the global maximum query time for naturalId queries executed against the database
|
String |
getNaturalIdQueryExecutionMaxTimeRegion()
Get the region for the maximum naturalId query time
|
long |
getOptimisticFailureCount()
The number of StaleObjectStateExceptions
that occurred
|
long |
getPrepareStatementCount()
The number of prepared statements that were acquired
|
String[] |
getQueries()
Get all executed query strings
|
long |
getQueryCacheHitCount()
Get the global number of cached queries successfully retrieved from cache
|
long |
getQueryCacheMissCount()
Get the global number of cached queries *not* found in cache
|
long |
getQueryCachePutCount()
Get the global number of cacheable queries put in cache
|
long |
getQueryExecutionCount()
Get global number of executed queries
|
long |
getQueryExecutionMaxTime()
Get the time in milliseconds of the slowest query.
|
String |
getQueryExecutionMaxTimeQueryString()
Get the query string for the slowest query.
|
QueryStatistics |
getQueryStatistics(String queryString)
Query statistics from query string (HQL or SQL)
|
long |
getSecondLevelCacheHitCount()
Global number of cacheable entities/collections successfully retrieved from the cache
|
long |
getSecondLevelCacheMissCount()
Global number of cacheable entities/collections not found in the cache and loaded from the database.
|
long |
getSecondLevelCachePutCount()
Global number of cacheable entities/collections put in the cache
|
String[] |
getSecondLevelCacheRegionNames()
Get all second-level cache region names
|
SecondLevelCacheStatistics |
getSecondLevelCacheStatistics(String regionName)
Second level cache statistics per region
|
long |
getSessionCloseCount()
Global number of sessions closed
|
long |
getSessionOpenCount()
Global number of sessions opened
|
long |
getStartTime() |
long |
getSuccessfulTransactionCount()
The number of transactions we know to have been successful
|
long |
getTransactionCount()
The number of transactions we know to have completed
|
long |
getUpdateTimestampsCacheHitCount()
Get the global number of timestamps successfully retrieved from cache
|
long |
getUpdateTimestampsCacheMissCount()
Get the global number of tables for which no update timestamps was *not* found in cache
|
long |
getUpdateTimestampsCachePutCount()
Get the global number of timestamps put in cache
|
void |
insertEntity(String entityName)
Callback about an entity being inserted
|
boolean |
isStatisticsEnabled()
Are statistics logged
|
void |
loadCollection(String role)
Callback about a collection loading.
|
void |
loadEntity(String entityName)
Callback about an entity being loaded.
|
void |
logSummary()
log in info level the main statistics
|
void |
naturalIdCacheHit(String regionName)
Callback indicating a get from natural id cache resulted in a hit.
|
void |
naturalIdCacheMiss(String regionName)
Callback indicating a get from natural id cache resulted in a miss.
|
void |
naturalIdCachePut(String regionName)
Callback indicating a put into natural id cache.
|
void |
naturalIdQueryExecuted(String regionName,
long time)
Callback indicating execution of a natural id query
|
void |
openSession()
Callback about a session being opened.
|
void |
optimisticFailure(String entityName)
Callback about an optimistic lock failure on an entity
|
void |
prepareStatement()
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 |
queryExecuted(String hql,
int rows,
long time)
Callback indicating execution of a sql/hql query
|
void |
recreateCollection(String role)
Callback indicating a collection recreation (full deletion + full (re-)insertion).
|
void |
removeCollection(String role)
Callback indicating a collection removal.
|
void |
secondLevelCacheHit(String regionName)
Callback indicating a get from second level cache resulted in a hit.
|
void |
secondLevelCacheMiss(String regionName)
Callback indicating a get from second level cache resulted in a miss.
|
void |
secondLevelCachePut(String regionName)
Callback indicating a put into second level cache.
|
void |
setStatisticsEnabled(boolean b)
Enable statistics logs (this is a dynamic parameter)
|
String |
toString() |
void |
updateCollection(String role)
Callback indicating a collection was updated.
|
void |
updateEntity(String entityName)
Callback about an entity being updated.
|
void |
updateTimestampsCacheHit()
Callback indicating a hit to the timestamp cache
|
void |
updateTimestampsCacheMiss()
Callback indicating a miss to the timestamp cache
|
void |
updateTimestampsCachePut()
Callback indicating a put to the timestamp cache
|
public ConcurrentStatisticsImpl()
public ConcurrentStatisticsImpl(SessionFactoryImplementor sessionFactory)
public void clear()
clear in interface Statisticspublic void openSession()
StatisticsImplementoropenSession in interface StatisticsImplementorpublic void closeSession()
StatisticsImplementorcloseSession in interface StatisticsImplementorpublic void flush()
StatisticsImplementorflush in interface StatisticsImplementorpublic void connect()
StatisticsImplementorConnectionProviderconnect in interface StatisticsImplementorpublic void loadEntity(String entityName)
StatisticsImplementorloadEntity in interface StatisticsImplementorentityName - The name of the entity loaded.public void fetchEntity(String entityName)
StatisticsImplementorStatisticsImplementor.loadEntity(java.lang.String) this indicates a separate query being
performed.fetchEntity in interface StatisticsImplementorentityName - The name of the entity fetched.public EntityStatistics getEntityStatistics(String entityName)
getEntityStatistics in interface StatisticsentityName - entity namepublic void updateEntity(String entityName)
StatisticsImplementorupdateEntity in interface StatisticsImplementorentityName - The name of the entity updated.public void insertEntity(String entityName)
StatisticsImplementorinsertEntity in interface StatisticsImplementorentityName - The name of the entity insertedpublic void deleteEntity(String entityName)
StatisticsImplementordeleteEntity in interface StatisticsImplementorentityName - The name of the entity deleted.public CollectionStatistics getCollectionStatistics(String role)
getCollectionStatistics in interface Statisticsrole - collection rolepublic void loadCollection(String role)
StatisticsImplementorloadCollection in interface StatisticsImplementorrole - The collection role.public void fetchCollection(String role)
StatisticsImplementorStatisticsImplementor.loadCollection(java.lang.String), this indicates a separate
query was needed.fetchCollection in interface StatisticsImplementorrole - The collection role.public void updateCollection(String role)
StatisticsImplementorupdateCollection in interface StatisticsImplementorrole - The collection role.public void recreateCollection(String role)
StatisticsImplementorrecreateCollection in interface StatisticsImplementorrole - The collection role.public void removeCollection(String role)
StatisticsImplementorremoveCollection in interface StatisticsImplementorrole - The collection role.public NaturalIdCacheStatistics getNaturalIdCacheStatistics(String regionName)
StatisticsgetNaturalIdCacheStatistics in interface StatisticsregionName - region namepublic SecondLevelCacheStatistics getSecondLevelCacheStatistics(String regionName)
getSecondLevelCacheStatistics in interface StatisticsregionName - region namepublic void secondLevelCachePut(String regionName)
StatisticsImplementorsecondLevelCachePut in interface StatisticsImplementorregionName - The name of the cache regionpublic void secondLevelCacheHit(String regionName)
StatisticsImplementorsecondLevelCacheHit in interface StatisticsImplementorregionName - The name of the cache regionpublic void secondLevelCacheMiss(String regionName)
StatisticsImplementorsecondLevelCacheMiss in interface StatisticsImplementorregionName - The name of the cache regionpublic void naturalIdCachePut(String regionName)
StatisticsImplementornaturalIdCachePut in interface StatisticsImplementorregionName - The name of the cache regionpublic void naturalIdCacheHit(String regionName)
StatisticsImplementornaturalIdCacheHit in interface StatisticsImplementorregionName - The name of the cache regionpublic void naturalIdCacheMiss(String regionName)
StatisticsImplementornaturalIdCacheMiss in interface StatisticsImplementorregionName - The name of the cache regionpublic void naturalIdQueryExecuted(String regionName, long time)
StatisticsImplementornaturalIdQueryExecuted in interface StatisticsImplementorregionName - The name of the cache regiontime - execution timepublic void queryExecuted(String hql, int rows, long time)
StatisticsImplementorqueryExecuted in interface StatisticsImplementorhql - The queryrows - Number of rows returnedtime - execution timepublic void queryCacheHit(String hql, String regionName)
StatisticsImplementorqueryCacheHit in interface StatisticsImplementorhql - The queryregionName - The name of the cache regionpublic void queryCacheMiss(String hql, String regionName)
StatisticsImplementorqueryCacheMiss in interface StatisticsImplementorhql - The queryregionName - The name of the cache regionpublic void queryCachePut(String hql, String regionName)
StatisticsImplementorqueryCachePut in interface StatisticsImplementorhql - The queryregionName - The cache regionpublic void updateTimestampsCacheHit()
StatisticsImplementorupdateTimestampsCacheHit in interface StatisticsImplementorpublic void updateTimestampsCacheMiss()
StatisticsImplementorupdateTimestampsCacheMiss in interface StatisticsImplementorpublic void updateTimestampsCachePut()
StatisticsImplementorupdateTimestampsCachePut in interface StatisticsImplementorpublic QueryStatistics getQueryStatistics(String queryString)
getQueryStatistics in interface StatisticsqueryString - query stringpublic long getEntityDeleteCount()
StatisticsgetEntityDeleteCount in interface Statisticspublic long getEntityInsertCount()
StatisticsgetEntityInsertCount in interface Statisticspublic long getEntityLoadCount()
StatisticsgetEntityLoadCount in interface Statisticspublic long getEntityFetchCount()
StatisticsgetEntityFetchCount in interface Statisticspublic long getEntityUpdateCount()
StatisticsgetEntityUpdateCount in interface Statisticspublic long getQueryExecutionCount()
StatisticsgetQueryExecutionCount in interface Statisticspublic long getQueryCacheHitCount()
StatisticsgetQueryCacheHitCount in interface Statisticspublic long getQueryCacheMissCount()
StatisticsgetQueryCacheMissCount in interface Statisticspublic long getQueryCachePutCount()
StatisticsgetQueryCachePutCount in interface Statisticspublic long getUpdateTimestampsCacheHitCount()
StatisticsgetUpdateTimestampsCacheHitCount in interface Statisticspublic long getUpdateTimestampsCacheMissCount()
StatisticsgetUpdateTimestampsCacheMissCount in interface Statisticspublic long getUpdateTimestampsCachePutCount()
StatisticsgetUpdateTimestampsCachePutCount in interface Statisticspublic long getFlushCount()
StatisticsgetFlushCount in interface Statisticspublic long getConnectCount()
StatisticsgetConnectCount in interface Statisticspublic long getSecondLevelCacheHitCount()
StatisticsgetSecondLevelCacheHitCount in interface Statisticspublic long getSecondLevelCacheMissCount()
StatisticsgetSecondLevelCacheMissCount in interface Statisticspublic long getSecondLevelCachePutCount()
StatisticsgetSecondLevelCachePutCount in interface Statisticspublic long getNaturalIdQueryExecutionCount()
StatisticsgetNaturalIdQueryExecutionCount in interface Statisticspublic long getNaturalIdQueryExecutionMaxTime()
StatisticsgetNaturalIdQueryExecutionMaxTime in interface Statisticspublic String getNaturalIdQueryExecutionMaxTimeRegion()
StatisticsgetNaturalIdQueryExecutionMaxTimeRegion in interface Statisticspublic long getNaturalIdCacheHitCount()
StatisticsgetNaturalIdCacheHitCount in interface Statisticspublic long getNaturalIdCacheMissCount()
StatisticsgetNaturalIdCacheMissCount in interface Statisticspublic long getNaturalIdCachePutCount()
StatisticsgetNaturalIdCachePutCount in interface Statisticspublic long getSessionCloseCount()
StatisticsgetSessionCloseCount in interface Statisticspublic long getSessionOpenCount()
StatisticsgetSessionOpenCount in interface Statisticspublic long getCollectionLoadCount()
StatisticsgetCollectionLoadCount in interface Statisticspublic long getCollectionFetchCount()
StatisticsgetCollectionFetchCount in interface Statisticspublic long getCollectionUpdateCount()
StatisticsgetCollectionUpdateCount in interface Statisticspublic long getCollectionRemoveCount()
StatisticsgetCollectionRemoveCount in interface Statisticspublic long getCollectionRecreateCount()
StatisticsgetCollectionRecreateCount in interface Statisticspublic long getStartTime()
getStartTime in interface StatisticsSystem.currentTimeMillis())public void logSummary()
logSummary in interface Statisticspublic boolean isStatisticsEnabled()
isStatisticsEnabled in interface Statisticspublic void setStatisticsEnabled(boolean b)
setStatisticsEnabled in interface Statisticspublic long getQueryExecutionMaxTime()
StatisticsgetQueryExecutionMaxTime in interface Statisticspublic String[] getQueries()
getQueries in interface Statisticspublic String[] getEntityNames()
getEntityNames in interface Statisticspublic String[] getCollectionRoleNames()
getCollectionRoleNames in interface Statisticspublic String[] getSecondLevelCacheRegionNames()
getSecondLevelCacheRegionNames in interface Statisticspublic void endTransaction(boolean success)
StatisticsImplementorendTransaction in interface StatisticsImplementorsuccess - Was the transaction successful?public long getSuccessfulTransactionCount()
StatisticsgetSuccessfulTransactionCount in interface Statisticspublic long getTransactionCount()
StatisticsgetTransactionCount in interface Statisticspublic void closeStatement()
StatisticsImplementorcloseStatement in interface StatisticsImplementorpublic void prepareStatement()
StatisticsImplementorprepareStatement in interface StatisticsImplementorpublic long getCloseStatementCount()
StatisticsgetCloseStatementCount in interface Statisticspublic long getPrepareStatementCount()
StatisticsgetPrepareStatementCount in interface Statisticspublic void optimisticFailure(String entityName)
StatisticsImplementoroptimisticFailure in interface StatisticsImplementorentityName - The name of the entity.public long getOptimisticFailureCount()
StatisticsgetOptimisticFailureCount in interface Statisticspublic String getQueryExecutionMaxTimeQueryString()
StatisticsgetQueryExecutionMaxTimeQueryString in interface StatisticsCopyright © 2017 JBoss by Red Hat. All rights reserved.