org.hibernate.SessionFactory . Beware of milliseconds metrics, they
are dependent of the JVM precision: you may then encounter a 10 ms approximation depending on you OS platform.
Please refer to the JVM documentation for more information.
| Modifier and Type | Field and Description |
|---|---|
| public static final int |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public CacheRegionStatistics | Returns: Stats for the named region, ornull if no such region existsThe unqualified region name regionName)Get statistics for either a domain-data or query-result region - this method checks both, preferring domain data region if one. |
| public long | |
| public long | |
| public long | |
| public long | |
| public long | |
| public String[] | |
| public CollectionStatistics | Returns: CollectionStatisticscollection role role)Get collection statistics per role |
| public long | |
| public 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) |
| public CacheRegionStatistics | Returns: The stats for the named region, ornull if the second level cache is
not enabledThe unqualified region name regionName)Second-level cache statistics per domain data (entity, collection, natural-id) region |
| public long | |
| public long | |
| public long | |
| public long | |
| public String[] | |
| public EntityStatistics | Returns: EntityStatistics objectentity name entityName)find entity statistics per name |
| public long | |
| public long | |
| public long | getNaturalIdCacheHitCount()
Get the global number of cached natural id lookups successfully retrieved from cache |
| public long | |
| public long | |
| public NaturalIdCacheStatistics | Returns: NaturalIdCacheStatisticsregion name regionName)
Deprecated
(since 5.3) Use
Natural id cache statistics per region
getNaturalIdStatistics or
getDomainDataRegionStatistics instead depending on need
|
| public long | getNaturalIdQueryExecutionCount()
Get the global number of natural id queries executed against the database |
| public long | getNaturalIdQueryExecutionMaxTime()
Get the global maximum query time for natural id queries executed against the database |
| public String | |
| public String | |
| public NaturalIdStatistics | Returns: NaturalIdCacheStatisticsThe entity name that is the root of the hierarchy containing the
natural id entityName)Natural id resolution query statistics for an entity type |
| public long | getOptimisticFailureCount()
The number of Hibernate StaleObjectStateExceptions or JPA OptimisticLockExceptions that occurred. |
| public long | |
| public String[] | |
| public long | |
| public long | |
| public long | |
| public long | |
| public long | |
| public String | |
| public default long | |
| public default long | |
| public CacheRegionStatistics | Returns: Stats for the named region, ornull if (1) query result caching is
not enabled or (2) no query region exists with that nameThe unqualified region name regionName)Second-level cache statistics per query region |
| public QueryStatistics | Returns: QueryStatisticsquery string queryString)Query statistics from query string (HQL or SQL) |
| public long | getSecondLevelCacheHitCount()
Global number of cacheable entities/collections successfully retrieved from the cache |
| public long | getSecondLevelCacheMissCount()
Global number of cacheable entities/collections not found in the cache and loaded from the database. |
| public long | |
| public String[] | |
| public SecondLevelCacheStatistics | Returns: SecondLevelCacheStatistics ornull if the second level cache is not enabledqualified region name regionName)
Deprecated
(since 5.3) Use
Second-level cache statistics per region
getDomainDataRegionStatistics instead
|
| public long | |
| public long | |
| public long | getStartTime()
The milliseconds (JVM standard |
| public long | |
| public long | |
| public long | getUpdateTimestampsCacheHitCount()
Get the global number of timestamps successfully retrieved from cache |
| public long | getUpdateTimestampsCacheMissCount()
Get the global number of timestamp requests that were not found in the cache |
| public long | |
| public boolean | |
| public void | |
| public void |
| DEFAULT_QUERY_STATISTICS_MAX_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_QUERY_STATISTICS_MAX_SIZE | |
| clear | back to summary |
|---|---|
| public void clear() reset all statistics | |
| getCacheRegionStatistics | back to summary |
|---|---|
| public CacheRegionStatistics getCacheRegionStatistics(String regionName) Get statistics for either a domain-data or query-result region - this method checks both, preferring domain data region if one. Think of it as a cascading check to: Note that returning null is preferred here over throwing an exception when no region exists with that name.
| |
| getCloseStatementCount | back to summary |
|---|---|
| public long getCloseStatementCount() The number of prepared statements that were released | |
| getCollectionFetchCount | back to summary |
|---|---|
| public long getCollectionFetchCount() Global number of collections fetched | |
| getCollectionLoadCount | back to summary |
|---|---|
| public long getCollectionLoadCount() Global number of collections loaded | |
| getCollectionRecreateCount | back to summary |
|---|---|
| public long getCollectionRecreateCount() Global number of collections recreated | |
| getCollectionRemoveCount | back to summary |
|---|---|
| public long getCollectionRemoveCount() Global number of collections removed | |
| getCollectionRoleNames | back to summary |
|---|---|
| public String[] getCollectionRoleNames() Get the names of all collection roles | |
| getCollectionStatistics | back to summary |
|---|---|
| public CollectionStatistics getCollectionStatistics(String role) Get collection statistics per role
| |
| getCollectionUpdateCount | back to summary |
|---|---|
| public long getCollectionUpdateCount() Global number of collections updated | |
| getConnectCount | back to summary |
|---|---|
| public 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) | |
| getDomainDataRegionStatistics | back to summary |
|---|---|
| public CacheRegionStatistics getDomainDataRegionStatistics(String regionName) Second-level cache statistics per domain data (entity, collection, natural-id) region
| |
| getEntityDeleteCount | back to summary |
|---|---|
| public long getEntityDeleteCount() Get global number of entity deletes
| |
| getEntityFetchCount | back to summary |
|---|---|
| public long getEntityFetchCount() Get global number of entity fetches
| |
| getEntityInsertCount | back to summary |
|---|---|
| public long getEntityInsertCount() Get global number of entity inserts
| |
| getEntityLoadCount | back to summary |
|---|---|
| public long getEntityLoadCount() Get global number of entity loads
| |
| getEntityNames | back to summary |
|---|---|
| public String[] getEntityNames() Get the names of all entities | |
| getEntityStatistics | back to summary |
|---|---|
| public EntityStatistics getEntityStatistics(String entityName) find entity statistics per name
| |
| getEntityUpdateCount | back to summary |
|---|---|
| public long getEntityUpdateCount() Get global number of entity updates
| |
| getFlushCount | back to summary |
|---|---|
| public long getFlushCount() Get the global number of flush operations executed (either manual or automatic). | |
| getNaturalIdCacheHitCount | back to summary |
|---|---|
| public long getNaturalIdCacheHitCount() Get the global number of cached natural id lookups successfully retrieved from cache | |
| getNaturalIdCacheMissCount | back to summary |
|---|---|
| public long getNaturalIdCacheMissCount() Get the global number of cached natural id lookups *not* found in cache | |
| getNaturalIdCachePutCount | back to summary |
|---|---|
| public long getNaturalIdCachePutCount() Get the global number of cacheable natural id lookups put in cache | |
| getNaturalIdCacheStatistics | back to summary |
|---|---|
| public NaturalIdCacheStatistics getNaturalIdCacheStatistics(String regionName)
Deprecated (since 5.3) Use Natural id cache statistics per region
| |
| getNaturalIdQueryExecutionCount | back to summary |
|---|---|
| public long getNaturalIdQueryExecutionCount() Get the global number of natural id queries executed against the database | |
| getNaturalIdQueryExecutionMaxTime | back to summary |
|---|---|
| public long getNaturalIdQueryExecutionMaxTime() Get the global maximum query time for natural id queries executed against the database | |
| getNaturalIdQueryExecutionMaxTimeEntity | back to summary |
|---|---|
| public String getNaturalIdQueryExecutionMaxTimeEntity() Get the entity for the maximum natural id query time | |
| getNaturalIdQueryExecutionMaxTimeRegion | back to summary |
|---|---|
| public String getNaturalIdQueryExecutionMaxTimeRegion() Get the region for the maximum natural id query time | |
| getNaturalIdStatistics | back to summary |
|---|---|
| public NaturalIdStatistics getNaturalIdStatistics(String entityName) Natural id resolution query statistics for an entity type
| |
| getOptimisticFailureCount | back to summary |
|---|---|
| public long getOptimisticFailureCount() The number of Hibernate StaleObjectStateExceptions or JPA OptimisticLockExceptions that occurred. | |
| getPrepareStatementCount | back to summary |
|---|---|
| public long getPrepareStatementCount() The number of prepared statements that were acquired | |
| getQueries | back to summary |
|---|---|
| public String[] getQueries() Get all executed query strings.
The maximum number of queries tracked by the Hibernate statistics is given by the | |
| getQueryCacheHitCount | back to summary |
|---|---|
| public long getQueryCacheHitCount() Get the global number of cached queries successfully retrieved from cache | |
| getQueryCacheMissCount | back to summary |
|---|---|
| public long getQueryCacheMissCount() Get the global number of cached queries *not* found in cache | |
| getQueryCachePutCount | back to summary |
|---|---|
| public long getQueryCachePutCount() Get the global number of cacheable queries put in cache | |
| getQueryExecutionCount | back to summary |
|---|---|
| public long getQueryExecutionCount() Get global number of executed queries
| |
| getQueryExecutionMaxTime | back to summary |
|---|---|
| public long getQueryExecutionMaxTime() Get the time in milliseconds of the slowest query. | |
| getQueryExecutionMaxTimeQueryString | back to summary |
|---|---|
| public String getQueryExecutionMaxTimeQueryString() Get the query string for the slowest query. | |
| getQueryPlanCacheHitCount | back to summary |
|---|---|
| public default long getQueryPlanCacheHitCount() Get the global number of query plans successfully retrieved from cache | |
| getQueryPlanCacheMissCount | back to summary |
|---|---|
| public default long getQueryPlanCacheMissCount() Get the global number of query plans lookups *not* found in cache | |
| getQueryRegionStatistics | back to summary |
|---|---|
| public CacheRegionStatistics getQueryRegionStatistics(String regionName) Second-level cache statistics per query region
| |
| getQueryStatistics | back to summary |
|---|---|
| public QueryStatistics getQueryStatistics(String queryString) Query statistics from query string (HQL or SQL)
| |
| getSecondLevelCacheHitCount | back to summary |
|---|---|
| public long getSecondLevelCacheHitCount() Global number of cacheable entities/collections successfully retrieved from the cache | |
| getSecondLevelCacheMissCount | back to summary |
|---|---|
| public long getSecondLevelCacheMissCount() Global number of cacheable entities/collections not found in the cache and loaded from the database. | |
| getSecondLevelCachePutCount | back to summary |
|---|---|
| public long getSecondLevelCachePutCount() Global number of cacheable entities/collections put in the cache | |
| getSecondLevelCacheRegionNames | back to summary |
|---|---|
| public String[] getSecondLevelCacheRegionNames() Get all second-level cache region names. Note for backwards compatibility this method returns just the names of regions storing domain data, not query result regions | |
| getSecondLevelCacheStatistics | back to summary |
|---|---|
| public SecondLevelCacheStatistics getSecondLevelCacheStatistics(String regionName)
Deprecated (since 5.3) Use Second-level cache statistics per region
| |
| getSessionCloseCount | back to summary |
|---|---|
| public long getSessionCloseCount() Global number of sessions closed | |
| getSessionOpenCount | back to summary |
|---|---|
| public long getSessionOpenCount() Global number of sessions opened | |
| getStartTime | back to summary |
|---|---|
| public long getStartTime() The milliseconds (JVM standard API Note This time(stamp) is | |
| getSuccessfulTransactionCount | back to summary |
|---|---|
| public long getSuccessfulTransactionCount() The number of transactions we know to have been successful | |
| getTransactionCount | back to summary |
|---|---|
| public long getTransactionCount() The number of transactions we know to have completed | |
| getUpdateTimestampsCacheHitCount | back to summary |
|---|---|
| public long getUpdateTimestampsCacheHitCount() Get the global number of timestamps successfully retrieved from cache | |
| getUpdateTimestampsCacheMissCount | back to summary |
|---|---|
| public long getUpdateTimestampsCacheMissCount() Get the global number of timestamp requests that were not found in the cache | |
| getUpdateTimestampsCachePutCount | back to summary |
|---|---|
| public long getUpdateTimestampsCachePutCount() Get the global number of timestamps put in cache | |
| isStatisticsEnabled | back to summary |
|---|---|
| public boolean isStatisticsEnabled() Are statistics enabled | |
| logSummary | back to summary |
|---|---|
| public void logSummary() log in info level the main statistics | |
| setStatisticsEnabled | back to summary |
|---|---|
| public void setStatisticsEnabled(boolean b) Enable statistics logs (this is a dynamic parameter) | |