|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.stat.ConcurrentStatisticsImpl
public class ConcurrentStatisticsImpl
Implementation of Statistics
, as well as StatisticsImplementor
, based on the
java.util.concurrent
package introduced in Java 5.
Constructor Summary | |
---|---|
ConcurrentStatisticsImpl()
|
|
ConcurrentStatisticsImpl(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 ConcurrentStatisticsImpl()
public ConcurrentStatisticsImpl(SessionFactoryImplementor sessionFactory)
Method Detail |
---|
public void clear()
clear
in interface Statistics
public void openSession()
openSession
in interface StatisticsImplementor
public void closeSession()
closeSession
in interface StatisticsImplementor
public void flush()
flush
in interface StatisticsImplementor
public void connect()
connect
in interface StatisticsImplementor
public void loadEntity(String entityName)
loadEntity
in interface StatisticsImplementor
public void fetchEntity(String entityName)
fetchEntity
in interface StatisticsImplementor
public EntityStatistics getEntityStatistics(String entityName)
getEntityStatistics
in interface Statistics
entityName
- entity name
public void updateEntity(String entityName)
updateEntity
in interface StatisticsImplementor
public void insertEntity(String entityName)
insertEntity
in interface StatisticsImplementor
public void deleteEntity(String entityName)
deleteEntity
in interface StatisticsImplementor
public CollectionStatistics getCollectionStatistics(String role)
getCollectionStatistics
in interface Statistics
role
- collection role
public void loadCollection(String role)
loadCollection
in interface StatisticsImplementor
public void fetchCollection(String role)
fetchCollection
in interface StatisticsImplementor
public void updateCollection(String role)
updateCollection
in interface StatisticsImplementor
public void recreateCollection(String role)
recreateCollection
in interface StatisticsImplementor
public void removeCollection(String role)
removeCollection
in interface StatisticsImplementor
public SecondLevelCacheStatistics getSecondLevelCacheStatistics(String regionName)
getSecondLevelCacheStatistics
in interface Statistics
regionName
- region name
public void secondLevelCachePut(String regionName)
secondLevelCachePut
in interface StatisticsImplementor
public void secondLevelCacheHit(String regionName)
secondLevelCacheHit
in interface StatisticsImplementor
public 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 StatisticsImplementor
public QueryStatistics getQueryStatistics(String queryString)
getQueryStatistics
in interface Statistics
queryString
- query string
public long getEntityDeleteCount()
Statistics
getEntityDeleteCount
in interface Statistics
public long getEntityInsertCount()
Statistics
getEntityInsertCount
in interface Statistics
public long getEntityLoadCount()
Statistics
getEntityLoadCount
in interface Statistics
public long getEntityFetchCount()
Statistics
getEntityFetchCount
in interface Statistics
public long getEntityUpdateCount()
Statistics
getEntityUpdateCount
in interface Statistics
public long getQueryExecutionCount()
Statistics
getQueryExecutionCount
in interface Statistics
public long getQueryCacheHitCount()
Statistics
getQueryCacheHitCount
in interface Statistics
public long getQueryCacheMissCount()
Statistics
getQueryCacheMissCount
in interface Statistics
public long getQueryCachePutCount()
Statistics
getQueryCachePutCount
in interface Statistics
public long getFlushCount()
Statistics
getFlushCount
in interface Statistics
public long getConnectCount()
Statistics
getConnectCount
in interface Statistics
public long getSecondLevelCacheHitCount()
Statistics
getSecondLevelCacheHitCount
in interface Statistics
public long getSecondLevelCacheMissCount()
Statistics
getSecondLevelCacheMissCount
in interface Statistics
public long getSecondLevelCachePutCount()
Statistics
getSecondLevelCachePutCount
in interface Statistics
public long getSessionCloseCount()
Statistics
getSessionCloseCount
in interface Statistics
public long getSessionOpenCount()
Statistics
getSessionOpenCount
in interface Statistics
public long getCollectionLoadCount()
Statistics
getCollectionLoadCount
in interface Statistics
public long getCollectionFetchCount()
Statistics
getCollectionFetchCount
in interface Statistics
public long getCollectionUpdateCount()
Statistics
getCollectionUpdateCount
in interface Statistics
public long getCollectionRemoveCount()
Statistics
getCollectionRemoveCount
in interface Statistics
public long getCollectionRecreateCount()
Statistics
getCollectionRecreateCount
in interface Statistics
public long getStartTime()
getStartTime
in interface Statistics
System.currentTimeMillis()
)public void logSummary()
logSummary
in interface Statistics
public boolean isStatisticsEnabled()
isStatisticsEnabled
in interface Statistics
public void setStatisticsEnabled(boolean b)
setStatisticsEnabled
in interface Statistics
public long getQueryExecutionMaxTime()
Statistics
getQueryExecutionMaxTime
in interface Statistics
public String[] getQueries()
getQueries
in interface Statistics
public String[] getEntityNames()
getEntityNames
in interface Statistics
public String[] getCollectionRoleNames()
getCollectionRoleNames
in interface Statistics
public String[] getSecondLevelCacheRegionNames()
getSecondLevelCacheRegionNames
in interface Statistics
public void endTransaction(boolean success)
endTransaction
in interface StatisticsImplementor
public long getSuccessfulTransactionCount()
Statistics
getSuccessfulTransactionCount
in interface Statistics
public long getTransactionCount()
Statistics
getTransactionCount
in interface Statistics
public void closeStatement()
closeStatement
in interface StatisticsImplementor
public void prepareStatement()
prepareStatement
in interface StatisticsImplementor
public long getCloseStatementCount()
Statistics
getCloseStatementCount
in interface Statistics
public long getPrepareStatementCount()
Statistics
getPrepareStatementCount
in interface Statistics
public void optimisticFailure(String entityName)
optimisticFailure
in interface StatisticsImplementor
public long getOptimisticFailureCount()
Statistics
getOptimisticFailureCount
in interface Statistics
public String toString()
toString
in class Object
public String getQueryExecutionMaxTimeQueryString()
Statistics
getQueryExecutionMaxTimeQueryString
in interface Statistics
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |