10 Statement Pool Monitor : DataDirect Statement Pool Monitor Interfaces and Classes

DataDirect Statement Pool Monitor Interfaces and Classes
This section describes the methods used by the DataDirect Statement Pool Monitor interfaces and classes.
ExtStatementPoolMonitor Class
This class is used to control and monitor a single statement pool. This class implements the ExtStatementPoolMonitorMBean interface. See “ExtStatementPoolMonitorMBean Interface” for a description of the methods in the ExtStatementPoolMonitorMBean interface.
ExtStatementPoolMonitorMBean Interface
Returns the name of a Statement Pool Monitor instance associated with the connection. The name is comprised of the name of the driver that established the connection, and the name and port of the server to which the Statement Pool Monitor is connected, and the MBean ID of the connection. For example:
Returns the hit count for the statement pool. The hit count is the number of times a lookup is performed for a statement that results in a cache hit. A cache hit occurs when the Statement Pool Monitor successfully finds a statement in the pool with the same SQL text, statement type, result set type, result set concurrency, and requested generated key information.
This method is useful to determine if your workload is using the statement pool effectively. For example, if the hit count is low, the statement pool is probably not being used to its best advantage.
Returns the miss count for the statement pool. The miss count is the number of times a lookup is performed for a statement that fails to result in a cache hit. A cache hit occurs when the Statement Pool Monitor successfully finds a statement in the pool with the same SQL text, statement type, result set type, result set concurrency, and requested generated key information.
This method is useful to determine if your workload is using the statement pool effectively. For example, if the miss count is high, the statement pool is probably not being used to its best advantage.
Changes the maximum number of statements that can be stored in the statement pool to the specified value. See “Importing Statements into a Statement Pool” for more information about how the maximum size affects loading statements.
ArrayList poolEntries(int statementType, int resultSetType, int resultSetConcurrency)
Returns a list of statements in the pool. The list is an array that contains a String entry for each statement in the statement pool. See “Using the poolEntries() Method” for more information.
Exports statements from the statement pool into the specified file. The file format contains an entry for each statement in the statement pool. See “Generating a Statement Pool Export File” for more information.
Exports statements from statement pool into the specified file. The file format contains an entry for each statement in the statement pool. See “Generating a Statement Pool Export File” for more information.
Returns whether the state of the statement pool is frozen. When the statement pool is frozen, the statements that can be stored in the pool are restricted to those that were in the pool at the time the pool was frozen. Freezing a pool is useful if you have a core set of statements that you do not want replaced by other statements when the core statements are closed. See “Freezing and Unfreezing the Statement Pool” for more information.
setFrozen(true) freezes the statement pool. setFrozen(false) unfreezes the statement pool. When the statement pool is frozen, the statements that can be stored in the pool are restricted to those that were in the pool at the time the pool was frozen. Freezing a pool is useful if you have a core set of statements that you do not want replaced by other statements when the core statements are closed. See “Freezing and Unfreezing the Statement Pool” for more information.