![]()
|
: Class PooledConnection
com.bitmechanic.sql
|
Fields inherited from interface java.sql.Connection |
TRANSACTION_NONE,
TRANSACTION_READ_COMMITTED,
TRANSACTION_READ_UNCOMMITTED,
TRANSACTION_REPEATABLE_READ,
TRANSACTION_SERIALIZABLE |
Constructor Summary | |
PooledConnection(java.sql.Connection conn,
ConnectionPool pool)
|
Method Summary | |
void |
clearWarnings()
|
void |
close()
Doesn't actually close the connection, but instead returns itself back to the pool to be re-used. |
void |
closeStatements()
Closes all PreparedStatments and CallableStatements |
void |
commit()
|
java.sql.Statement |
createStatement()
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
|
java.lang.String |
dumpInfo()
Dump some information about this connection and the statement |
boolean |
getAutoCommit()
|
java.lang.String |
getCatalog()
|
int |
getCheckoutCount()
Returns number of times this node has been checked out from the pool |
protected java.sql.Connection |
getConnection()
|
long |
getLastAccess()
Returns when this connection was last checked out; 0 if it has never been used. |
long |
getLastCheckin()
Returns when this connection was last checked in (when it's lock was last released); 0 if it has never been released. |
boolean |
getLock()
Returns true if this Connection is not in use. |
java.sql.DatabaseMetaData |
getMetaData()
|
java.sql.Connection |
getNativeConnection()
|
java.lang.Exception |
getTraceException()
If the connection pool is in trace mode, you can examine the stack trace in this exception to determine where it was last checked out. |
int |
getTransactionIsolation()
|
java.util.Map |
getTypeMap()
Proxy all other JDBC calls to actual Connection object |
java.sql.SQLWarning |
getWarnings()
|
void |
guardConnection()
|
boolean |
isClosed()
|
boolean |
isLocked()
|
boolean |
isReadOnly()
|
java.lang.String |
nativeSQL(java.lang.String sql)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
protected void |
releaseLock()
called by ConnectionPool.returnConnection() right before it wakes up the threads |
void |
rollback()
|
void |
run()
This is used by ConnectionPool.removeConnection(). |
void |
setAutoCommit(boolean autoCommit)
|
void |
setCatalog(java.lang.String catalog)
|
void |
setReadOnly(boolean readOnly)
|
protected void |
setTraceException(java.lang.Exception e)
|
void |
setTransactionIsolation(int level)
|
void |
setTypeMap(java.util.Map map)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public PooledConnection(java.sql.Connection conn, ConnectionPool pool)
Method Detail |
public void run()
public void closeStatements() throws java.sql.SQLException
public boolean getLock()
public boolean isLocked()
public int getCheckoutCount()
public long getLastAccess()
public long getLastCheckin()
public void close() throws java.sql.SQLException
protected void releaseLock()
protected java.sql.Connection getConnection()
public java.sql.Connection getNativeConnection()
public java.lang.String dumpInfo()
public void guardConnection()
public java.sql.Statement createStatement() throws java.sql.SQLException
public java.util.Map getTypeMap() throws java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql) throws java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
public java.lang.String nativeSQL(java.lang.String sql) throws java.sql.SQLException
public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException
public boolean getAutoCommit() throws java.sql.SQLException
public void commit() throws java.sql.SQLException
public void rollback() throws java.sql.SQLException
public boolean isClosed() throws java.sql.SQLException
public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
public void setReadOnly(boolean readOnly) throws java.sql.SQLException
public boolean isReadOnly() throws java.sql.SQLException
public void setCatalog(java.lang.String catalog) throws java.sql.SQLException
public java.lang.String getCatalog() throws java.sql.SQLException
public void setTypeMap(java.util.Map map) throws java.sql.SQLException
public void setTransactionIsolation(int level) throws java.sql.SQLException
public int getTransactionIsolation() throws java.sql.SQLException
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
public void clearWarnings() throws java.sql.SQLException
protected void setTraceException(java.lang.Exception e)
public java.lang.Exception getTraceException()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |