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()
StatisticsMBean
resetStats
in interface StatisticsMBean
public double getConnectionWaitTimeAvg()
StatisticsMBean
getConnectionWaitTimeAvg
in interface StatisticsMBean
public double getStatementExecuteTimeAvg()
StatisticsMBean
getStatementExecuteTimeAvg
in interface StatisticsMBean
public double getStatementPrepareTimeAvg()
StatisticsMBean
getStatementPrepareTimeAvg
in interface StatisticsMBean
public int getTotalLeased()
StatisticsMBean
getTotalLeased
in interface StatisticsMBean
public int getTotalFree()
StatisticsMBean
getTotalFree
in interface StatisticsMBean
public int getTotalCreatedConnections()
StatisticsMBean
getTotalCreatedConnections
in interface StatisticsMBean
public long getCacheHits()
StatisticsMBean
getCacheHits
in interface StatisticsMBean
public long getCacheMiss()
StatisticsMBean
getCacheMiss
in interface StatisticsMBean
public long getStatementsCached()
StatisticsMBean
getStatementsCached
in interface StatisticsMBean
public long getConnectionsRequested()
StatisticsMBean
getConnectionsRequested
in interface StatisticsMBean
public long getCumulativeConnectionWaitTime()
StatisticsMBean
getCumulativeConnectionWaitTime
in interface StatisticsMBean
protected 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()
StatisticsMBean
getCacheHitRatio
in interface StatisticsMBean
public long getStatementsExecuted()
StatisticsMBean
getStatementsExecuted
in interface StatisticsMBean
public long getCumulativeStatementExecutionTime()
StatisticsMBean
getCumulativeStatementExecutionTime
in interface StatisticsMBean
protected void addStatementExecuteTime(long time)
time
- protected void addStatementPrepareTime(long time)
time
- public long getCumulativeStatementPrepareTime()
StatisticsMBean
getCumulativeStatementPrepareTime
in interface StatisticsMBean
public long getStatementsPrepared()
StatisticsMBean
getStatementsPrepared
in interface StatisticsMBean
Copyright © 2009-2013 JolBox. All Rights Reserved.