com.jdbaccess.db
Class StatementPool
java.lang.Object
com.jdbaccess.db.StatementPool
public class StatementPool
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
debugMode
protected boolean debugMode
connPool
protected ConnPool connPool
queryConnPool
protected QueryConnPool queryConnPool
name
protected java.lang.String name
maxCachePoolSize
protected int maxCachePoolSize
cachePool
protected java.util.Hashtable cachePool
cachePoolSize
protected int cachePoolSize
cachePoolLRU
protected java.util.TreeMap cachePoolLRU
usePool
protected java.util.Hashtable usePool
stmtCounter
protected long stmtCounter
StatementPool
public StatementPool(ConnPool connPool,
QueryConnPool queryConnPool)
StatementPool
public StatementPool(ConnPool connPool,
QueryConnPool queryConnPool,
int maxCachePoolSize)
setMaxStmtCount
public static void setMaxStmtCount(long maxStmtCount)
setDebugModeOff
public void setDebugModeOff()
start
public void start()
throws ApplicationException
- Throws:
ApplicationException
end
public void end()
throws ApplicationException
- Close all statements in usePool and CachePool
- Throws:
java.sql.SQLException
ApplicationException
hasNetworkProblems
public boolean hasNetworkProblems()
getStatement
public int getStatement(com.jdbaccess.daimpl.DataAccessImpl da)
throws ApplicationException
- get a new prepared statement out of pool
- Returns:
- a new statement id
- Throws:
java.sql.SQLException
ApplicationException
findStatement
public Statement findStatement(int stmtId)
throws ApplicationException
- Throws:
ApplicationException
releaseStatement
public void releaseStatement(int stmtId)
throws ApplicationException
- release statement back to pool
- Parameters:
stmtId
-
- Throws:
java.sql.SQLException
ApplicationException
end
public void end(com.jdbaccess.daimpl.TransactionImpl t)
throws ApplicationException
- Throws:
ApplicationException
end
public void end(com.jdbaccess.daimpl.DataAccessImpl da)
throws ApplicationException
- Throws:
ApplicationException
ping
public void ping(long appId)
setPingInterval
public void setPingInterval(long pingInterval)
setCleanupInterval
public void setCleanupInterval(long cleanupInterval)
deleteStatementsFromUsedPoolByTransaction
public java.util.ArrayList deleteStatementsFromUsedPoolByTransaction(com.jdbaccess.daimpl.TransactionImpl t)
throws ApplicationException
- Throws:
ApplicationException
deleteStatementsFromCachePoolsByTransaction
public void deleteStatementsFromCachePoolsByTransaction(com.jdbaccess.daimpl.TransactionImpl t)
throws ApplicationException
- all statements are removed from cache pools by transaction
- Parameters:
t
-
- Throws:
ApplicationException