planetj.database.connection
Class ConnectionPoolReport

java.lang.Object
  |
  +--planetj.database.connection.ConnectionPoolReport

public final class ConnectionPoolReport
extends Object

Contains performace and usage statistics about a connection pool. Information in a ConnectionPoolReport represents the state of a connection pool at some previous point in time - the information does not change after the object has been created.


Constructor Summary
ConnectionPoolReport()
          ConnectionPoolReport constructor comment.
 
Method Summary
 String briefReport()
          Gets the String representation of this report.
 Object clone()
          Creates a deep copy of this object.
 ConnectionPoolReport cloneReport()
          Creates a deep copy of this object.
 String fullReport(List statements)
          Gets the String representation of this report.
 String getAlias()
          Gets the alias of the connection pool from which this report was generated
 DataEngineConnectionPool.RunningTotal getQueryTotal()
          Gets timing information about the queries run from the connection pool.
 long getReportGenerationTime()
          Gets the report generation time; the latest possible time when information in this report could have been recorded.
 long getReportStartTime()
          Gets the start time; the earliest possible time when information in this report could have been recorded.
 Map getStatementMap()
          Insert the method's description here.
 DataEngineConnectionPool.RunningTotal getStatementTotal()
          Gets timing information about the queries and updates run from the connection pool.
 int getSystemBusyFailures()
          Gets the number of connection requests that completely failed because the system ran out of connections.
 DataEngineConnectionPool.RunningTotal getUpdateTotal()
          Gets timing information about the updates run from this connection pool.
 int[] getUsageCounts()
          Gets information about the amount of usage this connection pool has seen.
 DataEngineConnectionPool.RunningTotal getWaitTotal()
          Gets timing information about connection requests which were forced to wait (because there were no available connections).
 boolean isConnectionPoolClosed()
          Tests if the connection pool has been shut down
 void setAlias(String newAlias)
          Sets the alias of the connection pool from which this report was generated
 void setConnectionPoolClosed(boolean newFinal)
          Sets if the connection pool has been shut down
 void setQueryTotal(DataEngineConnectionPool.RunningTotal newQueryTotal)
          Sets timing information about the queries run from the connection pool.
 void setReportStartTime(long newReportStartTime)
          Sets the start time; the earliest possible time when information in this report could have been recorded.
 void setStatementMap(Map newStatementMap)
          Insert the method's description here.
 void setStatementTotal(DataEngineConnectionPool.RunningTotal newStatementTotal)
          Sets timing information about the queries and updates run from the connection pool.
 void setSystemBusyFailures(int newFailureCount)
          Sets the number of connection requests that completely failed because the system ran out of connections.
 void setUpdateTotal(DataEngineConnectionPool.RunningTotal newUpdateTotal)
          Sets timing information about the updates run from the connection pool.
 void setUsageCounts(int[] newUsageCounts)
          Sets information about the amount of usage this connection pool has seen.
 void setWaitTotal(DataEngineConnectionPool.RunningTotal newWaitTotal)
          Sets timing information about connection requests which were forced to wait (because there were no available connections).
 String toString()
          Gets the String representation of this report.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionPoolReport

public ConnectionPoolReport()
ConnectionPoolReport constructor comment.

Method Detail

briefReport

public String briefReport()
Gets the String representation of this report. Detailed SQL information is not included.


clone

public Object clone()
Creates a deep copy of this object. The clone's report generation time is set to the current time, not the time in the original object.

Overrides:
clone in class Object

cloneReport

public ConnectionPoolReport cloneReport()
Creates a deep copy of this object. The clone's report generation time is set to the current time, not the time in the original object.


fullReport

public String fullReport(List statements)
Gets the String representation of this report. Detailed SQL information is included, but only for the SQL statements in the List.

Parameters:
statements - The list of SQL statements to include in the report. If this is null the details of all SQL statements will be included in the report.

getAlias

public String getAlias()
Gets the alias of the connection pool from which this report was generated


getQueryTotal

public DataEngineConnectionPool.RunningTotal getQueryTotal()
Gets timing information about the queries run from the connection pool.


getReportGenerationTime

public final long getReportGenerationTime()
Gets the report generation time; the latest possible time when information in this report could have been recorded.


getReportStartTime

public long getReportStartTime()
Gets the start time; the earliest possible time when information in this report could have been recorded.


getStatementMap

public Map getStatementMap()
Insert the method's description here. Creation date: (10/15/2002 9:53:25 AM)

Returns:
java.util.Map

getStatementTotal

public DataEngineConnectionPool.RunningTotal getStatementTotal()
Gets timing information about the queries and updates run from the connection pool.


getSystemBusyFailures

public int getSystemBusyFailures()
Gets the number of connection requests that completely failed because the system ran out of connections.


getUpdateTotal

public DataEngineConnectionPool.RunningTotal getUpdateTotal()
Gets timing information about the updates run from this connection pool.


getUsageCounts

public int[] getUsageCounts()

Gets information about the amount of usage this connection pool has seen. In the returned array, the value at position x indicates the number of times a connection was requested when x connections were already in use. So the value at position 0 is how many times a connection was requested when no connections were in use. The value at position 1 is the number of times a connection was requested when 1 connection was already in use, and so on.

The total sum of all the values in the array is the total number of connections that have been requested.

This method is not synchronized, so the values may not represent the exact state of the connection pool at any specific time


getWaitTotal

public DataEngineConnectionPool.RunningTotal getWaitTotal()
Gets timing information about connection requests which were forced to wait (because there were no available connections). The information included describes only the waiting period for connection requests which were forced to wait.


isConnectionPoolClosed

public boolean isConnectionPoolClosed()
Tests if the connection pool has been shut down


setAlias

public void setAlias(String newAlias)
Sets the alias of the connection pool from which this report was generated


setConnectionPoolClosed

public void setConnectionPoolClosed(boolean newFinal)
Sets if the connection pool has been shut down


setQueryTotal

public void setQueryTotal(DataEngineConnectionPool.RunningTotal newQueryTotal)
Sets timing information about the queries run from the connection pool.


setReportStartTime

public void setReportStartTime(long newReportStartTime)
Sets the start time; the earliest possible time when information in this report could have been recorded.


setStatementMap

public void setStatementMap(Map newStatementMap)
Insert the method's description here. Creation date: (10/15/2002 9:53:25 AM)

Parameters:
newStatementMap - java.util.Map

setStatementTotal

public void setStatementTotal(DataEngineConnectionPool.RunningTotal newStatementTotal)
Sets timing information about the queries and updates run from the connection pool.


setSystemBusyFailures

public void setSystemBusyFailures(int newFailureCount)
Sets the number of connection requests that completely failed because the system ran out of connections.


setUpdateTotal

public void setUpdateTotal(DataEngineConnectionPool.RunningTotal newUpdateTotal)
Sets timing information about the updates run from the connection pool.


setUsageCounts

public void setUsageCounts(int[] newUsageCounts)

Sets information about the amount of usage this connection pool has seen. In the returned array, the value at position x indicates the number of times a connection was requested when x connections were already in use. So the value at position 0 is how many times a connection was requested when no connections were in use. The value at position 1 is the number of times a connection was requested when 1 connection was already in use, and so on.

The total sum of all the values in the array is the total number of connections that have been requested.

This method is not synchronized, so the values may not represent the exact state of the connection pool at any specific time


setWaitTotal

public void setWaitTotal(DataEngineConnectionPool.RunningTotal newWaitTotal)
Sets timing information about connection requests which were forced to wait (because there were no available connections). The information included describes only the waiting period for connection requests which were forced to wait.


toString

public String toString()
Gets the String representation of this report. Detailed SQL information is not included.

Overrides:
toString in class Object