skip to main content
Using the Driver : Statement Pool Monitor : DataDirect Statement Pool Monitor Interfaces and Classes : ExtStatementPoolMonitorMBean Interface
  

Try DataDirect Drivers Now
ExtStatementPoolMonitorMBean Interface
ExtStatementPoolMonitorMBean Methods
Description
String getName()
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.
int getCurrentSize()
Returns the total number of statements cached in the statement pool.
long getHitCount()
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.
long getMissCount()
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.
int getMaxSize()
Returns the maximum number of statements that can be stored in the statement pool.
int setMaxSize(int value)
Changes the maximum number of statements that can be stored in the statement pool to the specified value.
void emptyPool()
Closes and discards all the statements in the statement pool.
void resetCounts()
Resets the hit and miss counts to zero (0). See long getHitCount() and long getMissCount() for more information.
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.
void exportStatements(File file_object)
Exports statements from the statement pool into the specified file. The file format contains an entry for each statement in the statement pool.
void exportStatements(String file_name)
Exports statements from statement pool into the specified file. The file format contains an entry for each statement in the statement pool.
void importStatements(File file_object)
Imports statements from the specified File object into the statement pool.
void importStatements(String file_name)
Imports statements from the specified file into the statement pool.
boolean isFrozen()
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.
void setFrozen(boolean)
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.