twcore.core
Class SQLConnectionPool
java.lang.Object
|
+--twcore.core.SQLConnectionPool
- All Implemented Interfaces:
- java.lang.Runnable
- public class SQLConnectionPool
- extends java.lang.Object
- implements java.lang.Runnable
Constructor Summary |
SQLConnectionPool(java.lang.String poolName,
java.lang.String dburl,
int minPool,
int maxPool,
int wait,
java.lang.String driver)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SQLConnectionPool
public SQLConnectionPool(java.lang.String poolName,
java.lang.String dburl,
int minPool,
int maxPool,
int wait,
java.lang.String driver)
throws java.sql.SQLException
query
public java.sql.ResultSet query(java.lang.String query)
throws java.sql.SQLException
java.sql.SQLException
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
java.sql.SQLException
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
free
public void free(java.sql.Connection connection)
totalConnections
public int totalConnections()
closeAllConnections
public void closeAllConnections()
isAvailable
public boolean isAvailable()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getNumBackground
public int getNumBackground()
reachedMaxBackground
public boolean reachedMaxBackground()
getMaxConnections
public int getMaxConnections()
incrementBackgroundCount
public void incrementBackgroundCount()
decrementBackgroundCount
public void decrementBackgroundCount()