|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.stat.StatisticsImpl
public class StatisticsImpl
Statistics| Constructor Summary | |
|---|---|
StatisticsImpl()
|
|
StatisticsImpl(SessionFactoryImplementor sessionFactory)
|
|
| Method Summary | |
|---|---|
void |
clear()
reset all statistics |
void |
closeSession()
|
void |
closeStatement()
|
void |
connect()
|
void |
deleteEntity(String entityName)
|
void |
endTransaction(boolean success)
|
void |
fetchCollection(String role)
|
void |
fetchEntity(String entityName)
|
void |
flush()
|
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 |
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 |
void |
insertEntity(String entityName)
|
boolean |
isStatisticsEnabled()
Are statistics logged |
void |
loadCollection(String role)
|
void |
loadEntity(String entityName)
|
void |
logSummary()
log in info level the main statistics |
void |
openSession()
|
void |
optimisticFailure(String entityName)
|
void |
prepareStatement()
|
void |
queryCacheHit(String hql,
String regionName)
|
void |
queryCacheMiss(String hql,
String regionName)
|
void |
queryCachePut(String hql,
String regionName)
|
void |
queryExecuted(String hql,
int rows,
long time)
|
void |
recreateCollection(String role)
|
void |
removeCollection(String role)
|
void |
secondLevelCacheHit(String regionName)
|
void |
secondLevelCacheMiss(String regionName)
|
void |
secondLevelCachePut(String regionName)
|
void |
setStatisticsEnabled(boolean b)
Enable statistics logs (this is a dynamic parameter) |
String |
toString()
|
void |
updateCollection(String role)
|
void |
updateEntity(String entityName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StatisticsImpl()
public StatisticsImpl(SessionFactoryImplementor sessionFactory)
| Method Detail |
|---|
public void clear()
clear in interface Statisticspublic void openSession()
openSession in interface StatisticsImplementorpublic void closeSession()
closeSession in interface StatisticsImplementorpublic void flush()
flush in interface StatisticsImplementorpublic void connect()
connect in interface StatisticsImplementorpublic void loadEntity(String entityName)
loadEntity in interface StatisticsImplementorpublic void fetchEntity(String entityName)
fetchEntity in interface StatisticsImplementorpublic EntityStatistics getEntityStatistics(String entityName)
getEntityStatistics in interface StatisticsentityName - entity name
public void updateEntity(String entityName)
updateEntity in interface StatisticsImplementorpublic void insertEntity(String entityName)
insertEntity in interface StatisticsImplementorpublic void deleteEntity(String entityName)
deleteEntity in interface StatisticsImplementorpublic CollectionStatistics getCollectionStatistics(String role)
getCollectionStatistics in interface Statisticsrole - collection role
public void loadCollection(String role)
loadCollection in interface StatisticsImplementorpublic void fetchCollection(String role)
fetchCollection in interface StatisticsImplementorpublic void updateCollection(String role)
updateCollection in interface StatisticsImplementorpublic void recreateCollection(String role)
recreateCollection in interface StatisticsImplementorpublic void removeCollection(String role)
removeCollection in interface StatisticsImplementorpublic SecondLevelCacheStatistics getSecondLevelCacheStatistics(String regionName)
getSecondLevelCacheStatistics in interface StatisticsregionName - region name
public void secondLevelCachePut(String regionName)
secondLevelCachePut in interface StatisticsImplementorpublic void secondLevelCacheHit(String regionName)
secondLevelCacheHit in interface StatisticsImplementorpublic void secondLevelCacheMiss(String regionName)
secondLevelCacheMiss in interface StatisticsImplementor
public void queryExecuted(String hql,
int rows,
long time)
queryExecuted in interface StatisticsImplementor
public void queryCacheHit(String hql,
String regionName)
queryCacheHit in interface StatisticsImplementor
public void queryCacheMiss(String hql,
String regionName)
queryCacheMiss in interface StatisticsImplementor
public void queryCachePut(String hql,
String regionName)
queryCachePut 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 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 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)
endTransaction in interface StatisticsImplementorpublic long getSuccessfulTransactionCount()
Statistics
getSuccessfulTransactionCount in interface Statisticspublic long getTransactionCount()
Statistics
getTransactionCount in interface Statisticspublic void closeStatement()
closeStatement in interface StatisticsImplementorpublic void prepareStatement()
prepareStatement in interface StatisticsImplementorpublic long getCloseStatementCount()
Statistics
getCloseStatementCount in interface Statisticspublic long getPrepareStatementCount()
Statistics
getPrepareStatementCount in interface Statisticspublic void optimisticFailure(String entityName)
optimisticFailure in interface StatisticsImplementorpublic 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 | |||||||||