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)
           
 
Method Summary
 void closeAllConnections()
           
 void decrementBackgroundCount()
           
 void free(java.sql.Connection connection)
           
 java.sql.Connection getConnection()
           
 int getMaxConnections()
           
 int getNumBackground()
           
 void incrementBackgroundCount()
           
 boolean isAvailable()
           
 java.sql.ResultSet query(java.lang.String query)
           
 boolean reachedMaxBackground()
           
 void run()
           
 java.lang.String toString()
           
 int totalConnections()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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
Method Detail

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()