Class StatisticsImpl

java.lang.Object
org.hibernate.stat.StatisticsImpl
All Implemented Interfaces:
Statistics, StatisticsImplementor

@Deprecated public class StatisticsImpl extends Object implements Statistics, StatisticsImplementor
Deprecated.
See Also:
  • Constructor Details

    • StatisticsImpl

      public StatisticsImpl()
      Deprecated.
    • StatisticsImpl

      public StatisticsImpl(SessionFactoryImplementor sessionFactory)
      Deprecated.
  • Method Details

    • clear

      public void clear()
      Deprecated.
      reset all statistics
      Specified by:
      clear in interface Statistics
    • openSession

      public void openSession()
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about a session being opened.
      Specified by:
      openSession in interface StatisticsImplementor
    • closeSession

      public void closeSession()
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about a session being closed.
      Specified by:
      closeSession in interface StatisticsImplementor
    • flush

      public void flush()
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about a flush occurring
      Specified by:
      flush in interface StatisticsImplementor
    • connect

      public void connect()
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about a connection being obtained from ConnectionProvider
      Specified by:
      connect in interface StatisticsImplementor
    • loadEntity

      public void loadEntity(String entityName)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about an entity being loaded. This might indicate a proxy or a fully initialized entity, but in either case it means without a separate SQL query being needed.
      Specified by:
      loadEntity in interface StatisticsImplementor
      Parameters:
      entityName - The name of the entity loaded.
    • fetchEntity

      public void fetchEntity(String entityName)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about an entity being fetched. Unlike StatisticsImplementor.loadEntity(java.lang.String) this indicates a separate query being performed.
      Specified by:
      fetchEntity in interface StatisticsImplementor
      Parameters:
      entityName - The name of the entity fetched.
    • getEntityStatistics

      public EntityStatistics getEntityStatistics(String entityName)
      Deprecated.
      find entity statistics per name
      Specified by:
      getEntityStatistics in interface Statistics
      Parameters:
      entityName - entity name
      Returns:
      EntityStatistics object
    • updateEntity

      public void updateEntity(String entityName)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about an entity being updated.
      Specified by:
      updateEntity in interface StatisticsImplementor
      Parameters:
      entityName - The name of the entity updated.
    • insertEntity

      public void insertEntity(String entityName)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about an entity being inserted
      Specified by:
      insertEntity in interface StatisticsImplementor
      Parameters:
      entityName - The name of the entity inserted
    • deleteEntity

      public void deleteEntity(String entityName)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about an entity being deleted.
      Specified by:
      deleteEntity in interface StatisticsImplementor
      Parameters:
      entityName - The name of the entity deleted.
    • getCollectionStatistics

      public CollectionStatistics getCollectionStatistics(String role)
      Deprecated.
      Get collection statistics per role
      Specified by:
      getCollectionStatistics in interface Statistics
      Parameters:
      role - collection role
      Returns:
      CollectionStatistics
    • loadCollection

      public void loadCollection(String role)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about a collection loading. This might indicate a lazy collection or an initialized collection being created, but in either case it means without a separate SQL query being needed.
      Specified by:
      loadCollection in interface StatisticsImplementor
      Parameters:
      role - The collection role.
    • fetchCollection

      public void fetchCollection(String role)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback to indicate a collection being fetched. Unlike StatisticsImplementor.loadCollection(java.lang.String), this indicates a separate query was needed.
      Specified by:
      fetchCollection in interface StatisticsImplementor
      Parameters:
      role - The collection role.
    • updateCollection

      public void updateCollection(String role)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback indicating a collection was updated.
      Specified by:
      updateCollection in interface StatisticsImplementor
      Parameters:
      role - The collection role.
    • recreateCollection

      public void recreateCollection(String role)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback indicating a collection recreation (full deletion + full (re-)insertion).
      Specified by:
      recreateCollection in interface StatisticsImplementor
      Parameters:
      role - The collection role.
    • removeCollection

      public void removeCollection(String role)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback indicating a collection removal.
      Specified by:
      removeCollection in interface StatisticsImplementor
      Parameters:
      role - The collection role.
    • getSecondLevelCacheStatistics

      public SecondLevelCacheStatistics getSecondLevelCacheStatistics(String regionName)
      Deprecated.
      Second level cache statistics per region
      Specified by:
      getSecondLevelCacheStatistics in interface Statistics
      Parameters:
      regionName - region name
      Returns:
      SecondLevelCacheStatistics
    • secondLevelCachePut

      public void secondLevelCachePut(String regionName)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback indicating a put into second level cache.
      Specified by:
      secondLevelCachePut in interface StatisticsImplementor
      Parameters:
      regionName - The name of the cache region
    • secondLevelCacheHit

      public void secondLevelCacheHit(String regionName)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback indicating a get from second level cache resulted in a hit.
      Specified by:
      secondLevelCacheHit in interface StatisticsImplementor
      Parameters:
      regionName - The name of the cache region
    • secondLevelCacheMiss

      public void secondLevelCacheMiss(String regionName)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback indicating a get from second level cache resulted in a miss.
      Specified by:
      secondLevelCacheMiss in interface StatisticsImplementor
      Parameters:
      regionName - The name of the cache region
    • queryExecuted

      public void queryExecuted(String hql, int rows, long time)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback indicating execution of a sql/hql query
      Specified by:
      queryExecuted in interface StatisticsImplementor
      Parameters:
      hql - The query
      rows - Number of rows returned
      time - execution time
    • queryCacheHit

      public void queryCacheHit(String hql, String regionName)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback indicating a get from the query cache resulted in a hit.
      Specified by:
      queryCacheHit in interface StatisticsImplementor
      Parameters:
      hql - The query
      regionName - The name of the cache region
    • queryCacheMiss

      public void queryCacheMiss(String hql, String regionName)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback indicating a get from the query cache resulted in a miss.
      Specified by:
      queryCacheMiss in interface StatisticsImplementor
      Parameters:
      hql - The query
      regionName - The name of the cache region
    • queryCachePut

      public void queryCachePut(String hql, String regionName)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback indicating a put into the query cache.
      Specified by:
      queryCachePut in interface StatisticsImplementor
      Parameters:
      hql - The query
      regionName - The cache region
    • getQueryStatistics

      public QueryStatistics getQueryStatistics(String queryString)
      Deprecated.
      Query statistics from query string (HQL or SQL)
      Specified by:
      getQueryStatistics in interface Statistics
      Parameters:
      queryString - query string
      Returns:
      QueryStatistics
    • getEntityDeleteCount

      public long getEntityDeleteCount()
      Deprecated.
      Description copied from interface: Statistics
      Get global number of entity deletes
      Specified by:
      getEntityDeleteCount in interface Statistics
      Returns:
      entity deletion count
    • getEntityInsertCount

      public long getEntityInsertCount()
      Deprecated.
      Description copied from interface: Statistics
      Get global number of entity inserts
      Specified by:
      getEntityInsertCount in interface Statistics
      Returns:
      entity insertion count
    • getEntityLoadCount

      public long getEntityLoadCount()
      Deprecated.
      Description copied from interface: Statistics
      Get global number of entity loads
      Specified by:
      getEntityLoadCount in interface Statistics
      Returns:
      entity load (from DB)
    • getEntityFetchCount

      public long getEntityFetchCount()
      Deprecated.
      Description copied from interface: Statistics
      Get global number of entity fetchs
      Specified by:
      getEntityFetchCount in interface Statistics
      Returns:
      entity fetch (from DB)
    • getEntityUpdateCount

      public long getEntityUpdateCount()
      Deprecated.
      Description copied from interface: Statistics
      Get global number of entity updates
      Specified by:
      getEntityUpdateCount in interface Statistics
      Returns:
      entity update
    • getQueryExecutionCount

      public long getQueryExecutionCount()
      Deprecated.
      Description copied from interface: Statistics
      Get global number of executed queries
      Specified by:
      getQueryExecutionCount in interface Statistics
      Returns:
      query execution count
    • getQueryCacheHitCount

      public long getQueryCacheHitCount()
      Deprecated.
      Description copied from interface: Statistics
      Get the global number of cached queries successfully retrieved from cache
      Specified by:
      getQueryCacheHitCount in interface Statistics
    • getQueryCacheMissCount

      public long getQueryCacheMissCount()
      Deprecated.
      Description copied from interface: Statistics
      Get the global number of cached queries *not* found in cache
      Specified by:
      getQueryCacheMissCount in interface Statistics
    • getQueryCachePutCount

      public long getQueryCachePutCount()
      Deprecated.
      Description copied from interface: Statistics
      Get the global number of cacheable queries put in cache
      Specified by:
      getQueryCachePutCount in interface Statistics
    • getFlushCount

      public long getFlushCount()
      Deprecated.
      Description copied from interface: Statistics
      Get the global number of flush executed by sessions (either implicit or explicit)
      Specified by:
      getFlushCount in interface Statistics
      Returns:
      flush
    • getConnectCount

      public long getConnectCount()
      Deprecated.
      Description copied from interface: Statistics
      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)
      Specified by:
      getConnectCount in interface Statistics
      Returns:
      session connect
    • getSecondLevelCacheHitCount

      public long getSecondLevelCacheHitCount()
      Deprecated.
      Description copied from interface: Statistics
      Global number of cacheable entities/collections successfully retrieved from the cache
      Specified by:
      getSecondLevelCacheHitCount in interface Statistics
      Returns:
      second level cache hit
    • getSecondLevelCacheMissCount

      public long getSecondLevelCacheMissCount()
      Deprecated.
      Description copied from interface: Statistics
      Global number of cacheable entities/collections not found in the cache and loaded from the database.
      Specified by:
      getSecondLevelCacheMissCount in interface Statistics
      Returns:
      second level cache miss
    • getSecondLevelCachePutCount

      public long getSecondLevelCachePutCount()
      Deprecated.
      Description copied from interface: Statistics
      Global number of cacheable entities/collections put in the cache
      Specified by:
      getSecondLevelCachePutCount in interface Statistics
      Returns:
      second level cache put
    • getSessionCloseCount

      public long getSessionCloseCount()
      Deprecated.
      Description copied from interface: Statistics
      Global number of sessions closed
      Specified by:
      getSessionCloseCount in interface Statistics
      Returns:
      session closing
    • getSessionOpenCount

      public long getSessionOpenCount()
      Deprecated.
      Description copied from interface: Statistics
      Global number of sessions opened
      Specified by:
      getSessionOpenCount in interface Statistics
      Returns:
      session opening
    • getCollectionLoadCount

      public long getCollectionLoadCount()
      Deprecated.
      Description copied from interface: Statistics
      Global number of collections loaded
      Specified by:
      getCollectionLoadCount in interface Statistics
      Returns:
      collection loading (from DB)
    • getCollectionFetchCount

      public long getCollectionFetchCount()
      Deprecated.
      Description copied from interface: Statistics
      Global number of collections fetched
      Specified by:
      getCollectionFetchCount in interface Statistics
      Returns:
      collection fetching (from DB)
    • getCollectionUpdateCount

      public long getCollectionUpdateCount()
      Deprecated.
      Description copied from interface: Statistics
      Global number of collections updated
      Specified by:
      getCollectionUpdateCount in interface Statistics
      Returns:
      collection update
    • getCollectionRemoveCount

      public long getCollectionRemoveCount()
      Deprecated.
      Description copied from interface: Statistics
      Global number of collections removed
      Specified by:
      getCollectionRemoveCount in interface Statistics
      Returns:
      collection removal FIXME: even if isInverse="true"?
    • getCollectionRecreateCount

      public long getCollectionRecreateCount()
      Deprecated.
      Description copied from interface: Statistics
      Global number of collections recreated
      Specified by:
      getCollectionRecreateCount in interface Statistics
      Returns:
      collection recreation
    • getStartTime

      public long getStartTime()
      Deprecated.
      Specified by:
      getStartTime in interface Statistics
      Returns:
      start time in ms (JVM standards System.currentTimeMillis())
    • logSummary

      public void logSummary()
      Deprecated.
      log in info level the main statistics
      Specified by:
      logSummary in interface Statistics
    • isStatisticsEnabled

      public boolean isStatisticsEnabled()
      Deprecated.
      Are statistics logged
      Specified by:
      isStatisticsEnabled in interface Statistics
    • setStatisticsEnabled

      public void setStatisticsEnabled(boolean b)
      Deprecated.
      Enable statistics logs (this is a dynamic parameter)
      Specified by:
      setStatisticsEnabled in interface Statistics
    • getQueryExecutionMaxTime

      public long getQueryExecutionMaxTime()
      Deprecated.
      Description copied from interface: Statistics
      Get the time in milliseconds of the slowest query.
      Specified by:
      getQueryExecutionMaxTime in interface Statistics
      Returns:
      Returns the max query execution time, for all queries
    • getQueries

      public String[] getQueries()
      Deprecated.
      Get all executed query strings
      Specified by:
      getQueries in interface Statistics
    • getEntityNames

      public String[] getEntityNames()
      Deprecated.
      Get the names of all entities
      Specified by:
      getEntityNames in interface Statistics
    • getCollectionRoleNames

      public String[] getCollectionRoleNames()
      Deprecated.
      Get the names of all collection roles
      Specified by:
      getCollectionRoleNames in interface Statistics
    • getSecondLevelCacheRegionNames

      public String[] getSecondLevelCacheRegionNames()
      Deprecated.
      Get all second-level cache region names
      Specified by:
      getSecondLevelCacheRegionNames in interface Statistics
    • endTransaction

      public void endTransaction(boolean success)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about a transaction completing.
      Specified by:
      endTransaction in interface StatisticsImplementor
      Parameters:
      success - Was the transaction successful?
    • getSuccessfulTransactionCount

      public long getSuccessfulTransactionCount()
      Deprecated.
      Description copied from interface: Statistics
      The number of transactions we know to have been successful
      Specified by:
      getSuccessfulTransactionCount in interface Statistics
    • getTransactionCount

      public long getTransactionCount()
      Deprecated.
      Description copied from interface: Statistics
      The number of transactions we know to have completed
      Specified by:
      getTransactionCount in interface Statistics
    • closeStatement

      public void closeStatement()
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about a statement being closed.
      Specified by:
      closeStatement in interface StatisticsImplementor
    • prepareStatement

      public void prepareStatement()
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about a statement being prepared.
      Specified by:
      prepareStatement in interface StatisticsImplementor
    • getCloseStatementCount

      public long getCloseStatementCount()
      Deprecated.
      Description copied from interface: Statistics
      The number of prepared statements that were released
      Specified by:
      getCloseStatementCount in interface Statistics
    • getPrepareStatementCount

      public long getPrepareStatementCount()
      Deprecated.
      Description copied from interface: Statistics
      The number of prepared statements that were acquired
      Specified by:
      getPrepareStatementCount in interface Statistics
    • optimisticFailure

      public void optimisticFailure(String entityName)
      Deprecated.
      Description copied from interface: StatisticsImplementor
      Callback about an optimistic lock failure on an entity
      Specified by:
      optimisticFailure in interface StatisticsImplementor
      Parameters:
      entityName - The name of the entity.
    • getOptimisticFailureCount

      public long getOptimisticFailureCount()
      Deprecated.
      Description copied from interface: Statistics
      The number of StaleObjectStateExceptions that occurred
      Specified by:
      getOptimisticFailureCount in interface Statistics
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object
    • getQueryExecutionMaxTimeQueryString

      public String getQueryExecutionMaxTimeQueryString()
      Deprecated.
      Description copied from interface: Statistics
      Get the query string for the slowest query.
      Specified by:
      getQueryExecutionMaxTimeQueryString in interface Statistics