|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.stat.internal.ConcurrentStatisticsImpl
public class ConcurrentStatisticsImpl
Implementation of Statistics based on the java.util.concurrent package.
| Constructor Summary | |
|---|---|
ConcurrentStatisticsImpl()
|
|
ConcurrentStatisticsImpl(SessionFactoryImplementor sessionFactory)
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConcurrentStatisticsImpl()
public ConcurrentStatisticsImpl(SessionFactoryImplementor sessionFactory)
| Method Detail |
|---|
public void clear()
clear in interface Statisticspublic void openSession()
StatisticsImplementor
openSession in interface StatisticsImplementorpublic void closeSession()
StatisticsImplementor
closeSession in interface StatisticsImplementorpublic void flush()
StatisticsImplementor
flush in interface StatisticsImplementorpublic void connect()
StatisticsImplementorConnectionProvider
connect in interface StatisticsImplementorpublic void loadEntity(String entityName)
StatisticsImplementor
loadEntity 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 name
public void updateEntity(String entityName)
StatisticsImplementor
updateEntity in interface StatisticsImplementorentityName - The name of the entity updated.public void insertEntity(String entityName)
StatisticsImplementor
insertEntity in interface StatisticsImplementorentityName - The name of the entity insertedpublic void deleteEntity(String entityName)
StatisticsImplementor
deleteEntity in interface StatisticsImplementorentityName - The name of the entity deleted.public CollectionStatistics getCollectionStatistics(String role)
getCollectionStatistics in interface Statisticsrole - collection role
public void loadCollection(String role)
StatisticsImplementor
loadCollection 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)
StatisticsImplementor
updateCollection in interface StatisticsImplementorrole - The collection role.public void recreateCollection(String role)
StatisticsImplementor
recreateCollection in interface StatisticsImplementorrole - The collection role.public void removeCollection(String role)
StatisticsImplementor
removeCollection in interface StatisticsImplementorrole - The collection role.public NaturalIdCacheStatistics getNaturalIdCacheStatistics(String regionName)
Statistics
getNaturalIdCacheStatistics in interface StatisticsregionName - region name
public SecondLevelCacheStatistics getSecondLevelCacheStatistics(String regionName)
getSecondLevelCacheStatistics in interface StatisticsregionName - region name
public void secondLevelCachePut(String regionName)
StatisticsImplementor
secondLevelCachePut in interface StatisticsImplementorregionName - The name of the cache regionpublic void secondLevelCacheHit(String regionName)
StatisticsImplementor
secondLevelCacheHit in interface StatisticsImplementorregionName - The name of the cache regionpublic void secondLevelCacheMiss(String regionName)
StatisticsImplementor
secondLevelCacheMiss in interface StatisticsImplementorregionName - The name of the cache regionpublic void naturalIdCachePut(String regionName)
StatisticsImplementor
naturalIdCachePut in interface StatisticsImplementorregionName - The name of the cache regionpublic void naturalIdCacheHit(String regionName)
StatisticsImplementor
naturalIdCacheHit in interface StatisticsImplementorregionName - The name of the cache regionpublic void naturalIdCacheMiss(String regionName)
StatisticsImplementor
naturalIdCacheMiss in interface StatisticsImplementorregionName - The name of the cache region
public void naturalIdQueryExecuted(String regionName,
long time)
StatisticsImplementor
naturalIdQueryExecuted in interface StatisticsImplementorregionName - The name of the cache regiontime - execution time
public void queryExecuted(String hql,
int rows,
long time)
StatisticsImplementor
queryExecuted in interface StatisticsImplementorhql - The queryrows - Number of rows returnedtime - execution time
public void queryCacheHit(String hql,
String regionName)
StatisticsImplementor
queryCacheHit in interface StatisticsImplementorhql - The queryregionName - The name of the cache region
public void queryCacheMiss(String hql,
String regionName)
StatisticsImplementor
queryCacheMiss in interface StatisticsImplementorhql - The queryregionName - The name of the cache region
public void queryCachePut(String hql,
String regionName)
StatisticsImplementor
queryCachePut in interface StatisticsImplementorhql - The queryregionName - The cache regionpublic void updateTimestampsCacheHit()
StatisticsImplementor
updateTimestampsCacheHit in interface StatisticsImplementorpublic void updateTimestampsCacheMiss()
StatisticsImplementor
updateTimestampsCacheMiss in interface StatisticsImplementorpublic void updateTimestampsCachePut()
StatisticsImplementor
updateTimestampsCachePut in interface StatisticsImplementorpublic QueryStatistics getQueryStatistics(String queryString)
getQueryStatistics in interface StatisticsqueryString - query string
public long getEntityDeleteCount()
Statistics
getEntityDeleteCount in interface Statisticspublic long getEntityInsertCount()
Statistics
getEntityInsertCount in interface Statisticspublic long getEntityLoadCount()
Statistics
getEntityLoadCount in interface Statisticspublic long getEntityFetchCount()
Statistics
getEntityFetchCount in interface Statisticspublic long getEntityUpdateCount()
Statistics
getEntityUpdateCount in interface Statisticspublic long getQueryExecutionCount()
Statistics
getQueryExecutionCount in interface Statisticspublic long getQueryCacheHitCount()
Statistics
getQueryCacheHitCount in interface Statisticspublic long getQueryCacheMissCount()
Statistics
getQueryCacheMissCount in interface Statisticspublic long getQueryCachePutCount()
Statistics
getQueryCachePutCount in interface Statisticspublic long getUpdateTimestampsCacheHitCount()
Statistics
getUpdateTimestampsCacheHitCount in interface Statisticspublic long getUpdateTimestampsCacheMissCount()
Statistics
getUpdateTimestampsCacheMissCount in interface Statisticspublic long getUpdateTimestampsCachePutCount()
Statistics
getUpdateTimestampsCachePutCount in interface Statisticspublic long getFlushCount()
Statistics
getFlushCount in interface Statisticspublic long getConnectCount()
Statistics
getConnectCount in interface Statisticspublic long getSecondLevelCacheHitCount()
Statistics
getSecondLevelCacheHitCount in interface Statisticspublic long getSecondLevelCacheMissCount()
Statistics
getSecondLevelCacheMissCount in interface Statisticspublic long getSecondLevelCachePutCount()
Statistics
getSecondLevelCachePutCount in interface Statisticspublic long getNaturalIdQueryExecutionCount()
Statistics
getNaturalIdQueryExecutionCount in interface Statisticspublic long getNaturalIdQueryExecutionMaxTime()
Statistics
getNaturalIdQueryExecutionMaxTime in interface Statisticspublic String getNaturalIdQueryExecutionMaxTimeRegion()
Statistics
getNaturalIdQueryExecutionMaxTimeRegion in interface Statisticspublic long getNaturalIdCacheHitCount()
Statistics
getNaturalIdCacheHitCount in interface Statisticspublic long getNaturalIdCacheMissCount()
Statistics
getNaturalIdCacheMissCount in interface Statisticspublic long getNaturalIdCachePutCount()
Statistics
getNaturalIdCachePutCount in interface Statisticspublic long getSessionCloseCount()
Statistics
getSessionCloseCount in interface Statisticspublic long getSessionOpenCount()
Statistics
getSessionOpenCount in interface Statisticspublic long getCollectionLoadCount()
Statistics
getCollectionLoadCount in interface Statisticspublic long getCollectionFetchCount()
Statistics
getCollectionFetchCount in interface Statisticspublic long getCollectionUpdateCount()
Statistics
getCollectionUpdateCount in interface Statisticspublic long getCollectionRemoveCount()
Statistics
getCollectionRemoveCount in interface Statisticspublic long getCollectionRecreateCount()
Statistics
getCollectionRecreateCount 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()
Statistics
getQueryExecutionMaxTime 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)
StatisticsImplementor
endTransaction in interface StatisticsImplementorsuccess - Was the transaction successful?public long getSuccessfulTransactionCount()
Statistics
getSuccessfulTransactionCount in interface Statisticspublic long getTransactionCount()
Statistics
getTransactionCount in interface Statisticspublic void closeStatement()
StatisticsImplementor
closeStatement in interface StatisticsImplementorpublic void prepareStatement()
StatisticsImplementor
prepareStatement in interface StatisticsImplementorpublic long getCloseStatementCount()
Statistics
getCloseStatementCount in interface Statisticspublic long getPrepareStatementCount()
Statistics
getPrepareStatementCount in interface Statisticspublic void optimisticFailure(String entityName)
StatisticsImplementor
optimisticFailure in interface StatisticsImplementorentityName - The name of the entity.public long getOptimisticFailureCount()
Statistics
getOptimisticFailureCount in interface Statisticspublic String toString()
toString in class Objectpublic String getQueryExecutionMaxTimeQueryString()
Statistics
getQueryExecutionMaxTimeQueryString in interface Statistics
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||