com.jolbox.bonecp
Class Statistics

java.lang.Object
  extended by com.jolbox.bonecp.Statistics
All Implemented Interfaces:
StatisticsMBean

public class Statistics
extends java.lang.Object
implements StatisticsMBean

Statistics class.

Author:
wallacew

Constructor Summary
Statistics(BoneCP pool)
          BoneCP handle.
 
Method Summary
 double getCacheHitRatio()
          Returns the cache hit ratio calculated as hits/(hits+misses).
 long getCacheHits()
          Returns the cacheHits field.
 long getCacheMiss()
          Returns the cacheMiss field.
 long getConnectionsRequested()
          Returns the connectionsRequested field.
 double getConnectionWaitTimeAvg()
          Return the average time it takes for a getConnection request to be services (in ms).
 long getCumulativeConnectionWaitTime()
          Returns the total time that the application waited in order to obtain its connections (in ms).
 long getCumulativeStatementExecutionTime()
          Returns the time taken for the prepared statements to execute (in ms).
 long getCumulativeStatementPrepareTime()
          Returns the time taken to prepare statements (or obtain from cache) (in ms).
 double getStatementExecuteTimeAvg()
          Return the average execution time for prepared statements to execute (in ms).
 double getStatementPrepareTimeAvg()
          Return the statement prepare time average (in ms).
 long getStatementsCached()
          Returns the number of statements that have been cached.
 long getStatementsExecuted()
          Returns the number of statements that have been executed.
 long getStatementsPrepared()
          Returns the number of statements prepared.
 int getTotalCreatedConnections()
          Return total number of connections created in all partitions.
 int getTotalFree()
          Return the number of free connections available to an application right away (excluding connections that can be created dynamically)
 int getTotalLeased()
          Return total number of connections currently in use by an application
 void resetStats()
          Reset all statistics.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Statistics

public Statistics(BoneCP pool)
BoneCP handle.

Parameters:
pool -
Method Detail

resetStats

public void resetStats()
Description copied from interface: StatisticsMBean
Reset all statistics.

Specified by:
resetStats in interface StatisticsMBean

getConnectionWaitTimeAvg

public double getConnectionWaitTimeAvg()
Description copied from interface: StatisticsMBean
Return the average time it takes for a getConnection request to be services (in ms).

Specified by:
getConnectionWaitTimeAvg in interface StatisticsMBean
Returns:
Time in ms

getStatementExecuteTimeAvg

public double getStatementExecuteTimeAvg()
Description copied from interface: StatisticsMBean
Return the average execution time for prepared statements to execute (in ms).

Specified by:
getStatementExecuteTimeAvg in interface StatisticsMBean
Returns:
Time in ms

getStatementPrepareTimeAvg

public double getStatementPrepareTimeAvg()
Description copied from interface: StatisticsMBean
Return the statement prepare time average (in ms).

Specified by:
getStatementPrepareTimeAvg in interface StatisticsMBean
Returns:
Time in ms

getTotalLeased

public int getTotalLeased()
Description copied from interface: StatisticsMBean
Return total number of connections currently in use by an application

Specified by:
getTotalLeased in interface StatisticsMBean
Returns:
no of leased connections

getTotalFree

public int getTotalFree()
Description copied from interface: StatisticsMBean
Return the number of free connections available to an application right away (excluding connections that can be created dynamically)

Specified by:
getTotalFree in interface StatisticsMBean
Returns:
number of free connections

getTotalCreatedConnections

public int getTotalCreatedConnections()
Description copied from interface: StatisticsMBean
Return total number of connections created in all partitions.

Specified by:
getTotalCreatedConnections in interface StatisticsMBean
Returns:
number of created connections

getCacheHits

public long getCacheHits()
Description copied from interface: StatisticsMBean
Returns the cacheHits field.

Specified by:
getCacheHits in interface StatisticsMBean
Returns:
cacheHits

getCacheMiss

public long getCacheMiss()
Description copied from interface: StatisticsMBean
Returns the cacheMiss field.

Specified by:
getCacheMiss in interface StatisticsMBean
Returns:
cacheMiss

getStatementsCached

public long getStatementsCached()
Description copied from interface: StatisticsMBean
Returns the number of statements that have been cached.

Specified by:
getStatementsCached in interface StatisticsMBean
Returns:
statementsCached

getConnectionsRequested

public long getConnectionsRequested()
Description copied from interface: StatisticsMBean
Returns the connectionsRequested field.

Specified by:
getConnectionsRequested in interface StatisticsMBean
Returns:
connectionsRequested

getCumulativeConnectionWaitTime

public long getCumulativeConnectionWaitTime()
Description copied from interface: StatisticsMBean
Returns the total time that the application waited in order to obtain its connections (in ms).

Specified by:
getCumulativeConnectionWaitTime in interface StatisticsMBean
Returns:
connectionWaitTime

getCacheHitRatio

public double getCacheHitRatio()
Description copied from interface: StatisticsMBean
Returns the cache hit ratio calculated as hits/(hits+misses).

Specified by:
getCacheHitRatio in interface StatisticsMBean
Returns:
hit ratio

getStatementsExecuted

public long getStatementsExecuted()
Description copied from interface: StatisticsMBean
Returns the number of statements that have been executed.

Specified by:
getStatementsExecuted in interface StatisticsMBean
Returns:
number of statements.

getCumulativeStatementExecutionTime

public long getCumulativeStatementExecutionTime()
Description copied from interface: StatisticsMBean
Returns the time taken for the prepared statements to execute (in ms).

Specified by:
getCumulativeStatementExecutionTime in interface StatisticsMBean
Returns:
time in ms

getCumulativeStatementPrepareTime

public long getCumulativeStatementPrepareTime()
Description copied from interface: StatisticsMBean
Returns the time taken to prepare statements (or obtain from cache) (in ms).

Specified by:
getCumulativeStatementPrepareTime in interface StatisticsMBean
Returns:
time in ms

getStatementsPrepared

public long getStatementsPrepared()
Description copied from interface: StatisticsMBean
Returns the number of statements prepared.

Specified by:
getStatementsPrepared in interface StatisticsMBean
Returns:
statements prepared


Copyright © 2009-2011 JolBox. All Rights Reserved.