|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object velosurf.sql.ConnectionPool
public class ConnectionPool
Connection pool.
Field Summary | |
---|---|
private boolean |
autocommit
autocommit flag |
private java.util.List<ConnectionWrapper> |
connections
list of all connections |
private DriverInfo |
driver
infos on the driver |
private int |
max
Maximum number of connections. |
private int |
min
Minimum number of connections. |
private java.lang.String |
password
password |
private java.lang.String |
schema
optional schema |
private java.lang.String |
url
database url |
private java.lang.String |
user
user |
Constructor Summary | |
---|---|
ConnectionPool(java.lang.String url,
java.lang.String user,
java.lang.String password,
java.lang.String schema,
DriverInfo driver,
boolean autocommit,
int min,
int max)
Constructor. |
Method Summary | |
---|---|
void |
clear()
clear all connections. |
private ConnectionWrapper |
createConnection()
Create a connection. |
ConnectionWrapper |
getConnection()
Get a connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String user
private java.lang.String password
private java.lang.String url
private java.lang.String schema
private DriverInfo driver
private boolean autocommit
private java.util.List<ConnectionWrapper> connections
private int min
private int max
Constructor Detail |
---|
public ConnectionPool(java.lang.String url, java.lang.String user, java.lang.String password, java.lang.String schema, DriverInfo driver, boolean autocommit, int min, int max) throws java.sql.SQLException
url
- urluser
- userpassword
- passwordschema
- schemadriver
- infos on the driverautocommit
- autocommitmin
- min connectionsmax
- max connections
java.sql.SQLException
Method Detail |
---|
public ConnectionWrapper getConnection() throws java.sql.SQLException
java.sql.SQLException
private ConnectionWrapper createConnection() throws java.sql.SQLException
java.sql.SQLException
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |