|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.jdbc.JDBCConnectionPool
public class JDBCConnectionPool
The JDBCConnectionPool manages pooled JDBCConnnections for the JDBCConnectionDriver.
| Field Summary | |
|---|---|
protected ReporterInterface |
reporter
|
protected static long |
uniqueIndex
|
| Constructor Summary | |
|---|---|
JDBCConnectionPool(java.lang.String jdbcURL,
java.lang.String username,
java.lang.String password,
ReporterInterface reporter)
Creates a JDBCConnectionPool using the given jdbcURL, username, password, and reporter. |
|
JDBCConnectionPool(java.lang.String jdbcURL,
java.lang.String username,
java.lang.String password,
ReporterInterface reporter,
boolean connectionTesting,
int poolSize)
Creates a JDBCConnectionPool using the given jdbcURL, username, password, reporter, validation, and pool size. |
|
JDBCConnectionPool(java.lang.String jdbcURL,
java.lang.String username,
java.lang.String password,
ReporterInterface reporter,
int poolSize)
Creates a JDBCConnectionPool using the given jdbcURL, username, password, reporter and pool size. |
|
| Method Summary | |
|---|---|
void |
closeConnections()
Removes each connection from the connection pool and stops the WatchDog thread. |
void |
debug(java.lang.String message)
Prints a debug message tagged with this JDBCConnectionPool's identity to the output stream. |
void |
error(java.lang.String message)
Prints an error message tagged with this JDBCConnectionPool's identity to the error stream. |
void |
error(java.lang.String message,
java.lang.Exception e)
Prints an error message tagged with this JDBCConnectionPool's identity followed by a stack trace of the passed Exception to the error stream. |
JDBCConnection |
getConnection()
Attempts to lease a connection from the pool. |
void |
println(java.lang.String message)
Prints a message tagged with this JDBCConnectionPool's identity to the output stream. |
void |
removeConnection(JDBCConnection c)
Removes the specified connection from the connection pool. |
void |
returnConnection(JDBCConnection conn)
Marks the specified connection as no longer in use so that it can be returned by subsequent calls to getConnection(). |
void |
setReporter(ReporterInterface reporter)
Sets the reporter for this JDBCConnectionPool. |
int |
size()
Returns the Pool's current size |
java.lang.String |
toString()
Returns this connection as a String. |
void |
warning(java.lang.String message)
Prints a warning message tagged with this JDBCConnectionPool's identity to the error stream. |
void |
warning(java.lang.String message,
java.lang.Exception e)
Prints an warning message tagged with this JDBCConnectionPool's identity followed by a stack trace of the passed Exception to error stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static long uniqueIndex
protected ReporterInterface reporter
| Constructor Detail |
|---|
public JDBCConnectionPool(java.lang.String jdbcURL,
java.lang.String username,
java.lang.String password,
ReporterInterface reporter)
throws java.sql.SQLException,
java.lang.InterruptedException
java.sql.SQLException
java.lang.InterruptedException
public JDBCConnectionPool(java.lang.String jdbcURL,
java.lang.String username,
java.lang.String password,
ReporterInterface reporter,
int poolSize)
throws java.sql.SQLException,
java.lang.InterruptedException
java.sql.SQLException
java.lang.InterruptedException
public JDBCConnectionPool(java.lang.String jdbcURL,
java.lang.String username,
java.lang.String password,
ReporterInterface reporter,
boolean connectionTesting,
int poolSize)
throws java.sql.SQLException,
java.lang.InterruptedException
java.sql.SQLException
java.lang.InterruptedException| Method Detail |
|---|
public int size()
public void closeConnections()
public void removeConnection(JDBCConnection c)
public JDBCConnection getConnection()
throws java.sql.SQLException,
java.lang.InterruptedException
java.sql.SQLException
java.lang.InterruptedExceptionpublic void returnConnection(JDBCConnection conn)
public java.lang.String toString()
toString in class java.lang.Objectpublic void debug(java.lang.String message)
public void warning(java.lang.String message)
public void warning(java.lang.String message,
java.lang.Exception e)
public void error(java.lang.String message)
public void error(java.lang.String message,
java.lang.Exception e)
public void println(java.lang.String message)
public void setReporter(ReporterInterface reporter)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||