|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.TimerTask | +--planetj.database.connection.ConnectionPoolReportDescriptor
Describes how connection pool reports should be generated. To begin generating reports, first
set the alias
of the connection pool to generate reports on, and then pass the
ConnectionPoolReportDescriptor to the
DatabaseManager.beginReportMonitoring()
method. This will cause a report about the connection pool to be generated at fixed intervals, and written
out to a text file. An additional report is generated when the connection pool is closed.
A given connection pool can only have one associated ConnectionPoolReportDescriptor generating reports for it at one time.
Field Summary | |
static byte |
FILE_APPEND
Indicates reports should be written to the same file, appended on to that file if it already exists |
static byte |
FILE_OVERWRITE
Indicates reports should be written to the same file, overwritting that file each time |
static byte |
FILE_SEPARATE
Indicates reports should be written to separate files |
static String |
STATEMENTS_ALL
Indicates that details of SQL statements should not be included in the report |
static String |
STATEMENTS_NONE
Indicates that details of all SQL statements should be included in the report |
Constructor Summary | |
ConnectionPoolReportDescriptor()
ConnectionPoolReportDescriptor constructor |
|
ConnectionPoolReportDescriptor(ConnectionReportPropertyGroup properties)
ConnectionPoolReportDescriptor constructor |
Method Summary | |
boolean |
cancel()
Disconnects this report descriptor from its connection pool - no further reports will be generated by this report descriptor. |
String |
getAlias()
Gets the alias of the connection pool for which reports should be generated. |
String |
getFileName()
Gets the file name to save reports under. |
byte |
getFileWriteType()
Tests what type of file writing should be used. |
ConnectionPoolReport |
getLastReport()
Gets the last report generated by this report descriptor |
int |
getReportInterval()
Gets the approximate number of seconds to wait between reports. |
List |
getSQLStatements()
Gets the list of SQL statements to include in the report. |
boolean |
isActive()
Tests if this report descriptor is currently attached to a connection pool, and will periodically generate reports about that connection pool. |
boolean |
isCumulative()
Tests if each report should begin where the last report left off (the default), or if each report should be cumulative, containing all information generated since the connection pool was created. |
boolean |
isImmediateReportRequired()
Tests if the first report should be generated immediately after this object is passed to the DatabaseManager.beginReportMonitoring()
method. |
boolean |
isLocked()
Tests if this object is locked. |
void |
run()
This is an internal method, and should only be invoked by the DataEngine. |
void |
setAlias(String newAlias)
Sets the alias of the connection pool for which reports should be generated. |
void |
setCumulative(boolean newCumulative)
Sets if each report should begin where the last report left off (the default), or if each report should be cumulative, containing all information generated since the connection pool was created. |
void |
setFileName(String newFileName)
Sets the file name to save reports under. |
void |
setFileWriteType(byte newFileType)
Sets what type of file writing should be used. |
void |
setImmediateReportRequired(boolean newImmediateReportRequired)
Sets if the first report should be generated immediately after this object is passed to the DatabaseManager.beginReportMonitoring()
method. |
void |
setProperties(ConnectionReportPropertyGroup properties)
Sets the values of this report descriptor |
void |
setReportInterval(int newReportInterval)
Sets the approximate number of seconds to wait between reports. |
void |
setSQLStatements(List newSQLStatements)
Sets the list of SQL statements to include in the report. |
void |
writeReport(ConnectionPoolReport report)
Writes the report out to the file. |
Methods inherited from class java.util.TimerTask |
scheduledExecutionTime |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final byte FILE_SEPARATE
public static final byte FILE_OVERWRITE
public static final byte FILE_APPEND
public static final String STATEMENTS_ALL
public static final String STATEMENTS_NONE
Constructor Detail |
public ConnectionPoolReportDescriptor()
public ConnectionPoolReportDescriptor(ConnectionReportPropertyGroup properties)
Method Detail |
public boolean cancel()
cancel
in class TimerTask
public String getAlias()
public String getFileName()
overwriteFile
property is false, then a date-timestamp will be appended onto
this value each time a report file is saved.
public byte getFileWriteType()
public ConnectionPoolReport getLastReport()
public int getReportInterval()
public List getSQLStatements()
public boolean isActive()
public boolean isCumulative()
public boolean isImmediateReportRequired()
DatabaseManager.beginReportMonitoring()
method. By default, the first report is only generated after the
reportInterval
number of seconds has passed
public boolean isLocked()
DatabaseManager.beginReportMonitoring()
method is invoked with this object, it becomes locked, and cannot be altered.
public void run()
run
in interface Runnable
run
in class TimerTask
public void setAlias(String newAlias)
public void setCumulative(boolean newCumulative)
public void setFileName(String newFileName)
overwriteFile
property is false, then a date-timestamp will be appended onto
this value each time a report file is saved.
public void setFileWriteType(byte newFileType)
public void setImmediateReportRequired(boolean newImmediateReportRequired)
DatabaseManager.beginReportMonitoring()
method. By default, the first report is only generated after the
reportInterval
number of seconds has passed
public void setProperties(ConnectionReportPropertyGroup properties)
public void setReportInterval(int newReportInterval)
public void setSQLStatements(List newSQLStatements)
public void writeReport(ConnectionPoolReport report) throws CMException
CMException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |