public class Statistics extends Object implements StatisticsMBean, Serializable
| Constructor and Description |
|---|
Statistics(BoneCP pool)
BoneCP handle.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCumulativeConnectionWaitTime(long increment)
Adds connection wait time.
|
protected void |
addStatementExecuteTime(long time)
Accessor method
|
protected void |
addStatementPrepareTime(long time)
Accessor method
|
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
|
protected void |
incrementCacheHits()
Accessor method.
|
protected void |
incrementCacheMiss()
Accessor method.
|
protected void |
incrementConnectionsRequested()
Accessor method.
|
protected void |
incrementStatementsCached()
Accessor method.
|
protected void |
incrementStatementsExecuted()
Adds statements executed.
|
protected void |
incrementStatementsPrepared()
Adds statements executed.
|
void |
resetStats()
Reset all statistics.
|
public Statistics(BoneCP pool)
pool - public void resetStats()
StatisticsMBeanresetStats in interface StatisticsMBeanpublic double getConnectionWaitTimeAvg()
StatisticsMBeangetConnectionWaitTimeAvg in interface StatisticsMBeanpublic double getStatementExecuteTimeAvg()
StatisticsMBeangetStatementExecuteTimeAvg in interface StatisticsMBeanpublic double getStatementPrepareTimeAvg()
StatisticsMBeangetStatementPrepareTimeAvg in interface StatisticsMBeanpublic int getTotalLeased()
StatisticsMBeangetTotalLeased in interface StatisticsMBeanpublic int getTotalFree()
StatisticsMBeangetTotalFree in interface StatisticsMBeanpublic int getTotalCreatedConnections()
StatisticsMBeangetTotalCreatedConnections in interface StatisticsMBeanpublic long getCacheHits()
StatisticsMBeangetCacheHits in interface StatisticsMBeanpublic long getCacheMiss()
StatisticsMBeangetCacheMiss in interface StatisticsMBeanpublic long getStatementsCached()
StatisticsMBeangetStatementsCached in interface StatisticsMBeanpublic long getConnectionsRequested()
StatisticsMBeangetConnectionsRequested in interface StatisticsMBeanpublic long getCumulativeConnectionWaitTime()
StatisticsMBeangetCumulativeConnectionWaitTime in interface StatisticsMBeanprotected void addCumulativeConnectionWaitTime(long increment)
increment - protected void incrementStatementsExecuted()
protected void incrementStatementsPrepared()
protected void incrementStatementsCached()
protected void incrementCacheMiss()
protected void incrementCacheHits()
protected void incrementConnectionsRequested()
public double getCacheHitRatio()
StatisticsMBeangetCacheHitRatio in interface StatisticsMBeanpublic long getStatementsExecuted()
StatisticsMBeangetStatementsExecuted in interface StatisticsMBeanpublic long getCumulativeStatementExecutionTime()
StatisticsMBeangetCumulativeStatementExecutionTime in interface StatisticsMBeanprotected void addStatementExecuteTime(long time)
time - protected void addStatementPrepareTime(long time)
time - public long getCumulativeStatementPrepareTime()
StatisticsMBeangetCumulativeStatementPrepareTime in interface StatisticsMBeanpublic long getStatementsPrepared()
StatisticsMBeangetStatementsPrepared in interface StatisticsMBeanCopyright © 2009-2013 JolBox. All Rights Reserved.