|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.dbpool.ConnectionProxy
public final class ConnectionProxy
This "implements" Connection, and is a proxy to the actual connection maintained in ConnectionPoolEntry. An instance is created every time a connection is allocated from the pool and returned to the user. This instance is never reused and becomes invalid after close() is called on it.
This also contains all of the data associated with a connection, for debugging, logging and statistics gathering. Most of the data herein is locked by this. FIXME Must implement java.sql.PooledConnection.
Field Summary |
---|
Fields inherited from interface java.sql.Connection |
---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Method Summary | ||
---|---|---|
void |
addOwnerInfo(java.lang.Object oo)
Adds owner info objects to the connection. |
|
void |
checkHangState(to.etc.dbpool.HangCheckState hs)
Called without any locks to see if this connection is a "hanging" connection. |
|
void |
clearWarnings()
|
|
void |
close()
The "normal" close releases all resources associated with this connection by closing them, then it returns the connection to the pool. |
|
void |
commit()
|
|
java.sql.Array |
createArrayOf(java.lang.String arg0,
java.lang.Object[] arg1)
|
|
java.sql.Blob |
createBlob()
|
|
java.sql.Clob |
createClob()
|
|
java.sql.NClob |
createNClob()
|
|
java.sql.SQLXML |
createSQLXML()
|
|
java.sql.Statement |
createStatement()
|
|
java.sql.Statement |
createStatement(int p1,
int p2)
|
|
java.sql.Statement |
createStatement(int p1,
int p2,
int p3)
|
|
java.sql.Struct |
createStruct(java.lang.String arg0,
java.lang.Object[] arg1)
|
|
void |
forceClosed()
Actually closes a proxy, if not already done. |
|
Tracepoint |
getAllocationPoint()
|
|
long |
getAllocationTime()
Return the immutable allocation time. |
|
boolean |
getAutoCommit()
|
|
java.lang.String |
getCatalog()
|
|
java.util.Properties |
getClientInfo()
|
|
java.lang.String |
getClientInfo(java.lang.String arg0)
|
|
int |
getHoldability()
|
|
int |
getId()
|
|
long |
getLastUsedTime()
Return the time this was last used. |
|
java.sql.DatabaseMetaData |
getMetaData()
|
|
java.lang.Thread |
getOwnerThread()
|
|
ConnectionPool |
getPool()
|
|
java.lang.String |
getPoolID()
|
|
java.sql.Connection |
getRealConnection()
Returns the REAL database connection (the one obtained from the JDBC driver) for this proxy. |
|
ConnState |
getState()
|
|
java.util.List<Tracepoint> |
getTraceList()
Return the list of tracepoints, from old to new. |
|
int |
getTransactionIsolation()
|
|
java.util.Map |
getTypeMap()
|
|
java.sql.SQLWarning |
getWarnings()
|
|
boolean |
isClosed()
|
|
boolean |
isCollectStatistics()
|
|
boolean |
isReadOnly()
|
|
boolean |
isUnpooled()
THIS MAY ONLY LOCK THIS AND MUST BE IMMUTABLE. |
|
boolean |
isValid(int arg0)
|
|
boolean |
isWrapperFor(java.lang.Class<?> iface)
|
|
java.lang.String |
nativeSQL(java.lang.String p1)
|
|
java.sql.CallableStatement |
prepareCall(java.lang.String p1)
|
|
java.sql.CallableStatement |
prepareCall(java.lang.String p1,
int p2,
int p3)
|
|
java.sql.CallableStatement |
prepareCall(java.lang.String name,
int a,
int b,
int c)
|
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String p1)
|
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String p1,
int p2)
|
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String p1,
int[] p2)
|
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String p1,
int p2,
int p3)
|
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String p1,
int p2,
int p3,
int p4)
|
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String a,
java.lang.String[] ar)
|
|
void |
releaseSavepoint(java.sql.Savepoint sp)
|
|
protected void |
removeResource(java.lang.Object o)
This removes the resource from the resource list because it was normally closed. |
|
void |
rollback()
|
|
void |
rollback(java.sql.Savepoint sp)
|
|
void |
setAutoCommit(boolean p1)
|
|
void |
setCatalog(java.lang.String p1)
|
|
void |
setClientInfo(java.util.Properties arg0)
|
|
void |
setClientInfo(java.lang.String arg0,
java.lang.String arg1)
|
|
void |
setHoldability(int m)
|
|
void |
setReadOnly(boolean p1)
|
|
java.sql.Savepoint |
setSavepoint()
|
|
java.sql.Savepoint |
setSavepoint(java.lang.String name)
|
|
void |
setTransactionIsolation(int p1)
|
|
void |
setTypeMap(java.util.Map p1)
|
|
void |
setUncloseable(boolean unclosable)
Forbid a connection from being closed using the normal close() method. |
|
protected to.etc.dbpool.IInfoHandler |
statsHandler()
|
|
java.lang.String |
toString()
|
|
|
unwrap(java.lang.Class<T> iface)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public long getAllocationTime()
public Tracepoint getAllocationPoint()
public java.lang.Thread getOwnerThread()
public java.lang.String getPoolID()
public boolean isCollectStatistics()
public int getId()
protected to.etc.dbpool.IInfoHandler statsHandler()
public ConnectionPool getPool()
public final boolean isUnpooled()
public java.lang.String toString()
toString
in class java.lang.Object
public void addOwnerInfo(java.lang.Object oo)
oo
- public ConnState getState()
public java.sql.Connection getRealConnection()
public void close() throws java.sql.SQLException
close
in interface java.sql.Connection
java.sql.SQLException
public void forceClosed() throws java.sql.SQLException
java.sql.SQLException
public java.util.List<Tracepoint> getTraceList()
public long getLastUsedTime()
public void checkHangState(to.etc.dbpool.HangCheckState hs)
Unpooled connections have their hang state checked using a staggered time interval. They are never cleared unless we are in "urgent" mode.
hs
- protected void removeResource(java.lang.Object o)
o
- the resource to remove.public void setUncloseable(boolean unclosable)
public java.sql.PreparedStatement prepareStatement(java.lang.String p1) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String p1, int[] p2) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String p1, int p2) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String p1, int p2, int p3) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String p1, int p2, int p3, int p4) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String name, int a, int b, int c) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String a, java.lang.String[] ar) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Statement createStatement() throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Statement createStatement(int p1, int p2) throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Statement createStatement(int p1, int p2, int p3) throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String p1, int p2, int p3) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String p1) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
java.sql.SQLException
public void setCatalog(java.lang.String p1) throws java.sql.SQLException
setCatalog
in interface java.sql.Connection
java.sql.SQLException
public void rollback() throws java.sql.SQLException
rollback
in interface java.sql.Connection
java.sql.SQLException
public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Connection
java.sql.SQLException
public java.util.Map getTypeMap() throws java.sql.SQLException
getTypeMap
in interface java.sql.Connection
java.sql.SQLException
public int getTransactionIsolation() throws java.sql.SQLException
getTransactionIsolation
in interface java.sql.Connection
java.sql.SQLException
public void setTransactionIsolation(int p1) throws java.sql.SQLException
setTransactionIsolation
in interface java.sql.Connection
java.sql.SQLException
public boolean isClosed() throws java.sql.SQLException
isClosed
in interface java.sql.Connection
java.sql.SQLException
public void setAutoCommit(boolean p1) throws java.sql.SQLException
setAutoCommit
in interface java.sql.Connection
java.sql.SQLException
public void commit() throws java.sql.SQLException
commit
in interface java.sql.Connection
java.sql.SQLException
public java.lang.String getCatalog() throws java.sql.SQLException
getCatalog
in interface java.sql.Connection
java.sql.SQLException
public boolean isReadOnly() throws java.sql.SQLException
isReadOnly
in interface java.sql.Connection
java.sql.SQLException
public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
getMetaData
in interface java.sql.Connection
java.sql.SQLException
public void setReadOnly(boolean p1) throws java.sql.SQLException
setReadOnly
in interface java.sql.Connection
java.sql.SQLException
public boolean getAutoCommit() throws java.sql.SQLException
getAutoCommit
in interface java.sql.Connection
java.sql.SQLException
public java.lang.String nativeSQL(java.lang.String p1) throws java.sql.SQLException
nativeSQL
in interface java.sql.Connection
java.sql.SQLException
public void setTypeMap(java.util.Map p1) throws java.sql.SQLException
setTypeMap
in interface java.sql.Connection
java.sql.SQLException
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.Connection
java.sql.SQLException
public void releaseSavepoint(java.sql.Savepoint sp) throws java.sql.SQLException
releaseSavepoint
in interface java.sql.Connection
java.sql.SQLException
public void rollback(java.sql.Savepoint sp) throws java.sql.SQLException
rollback
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Savepoint setSavepoint(java.lang.String name) throws java.sql.SQLException
setSavepoint
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Savepoint setSavepoint() throws java.sql.SQLException
setSavepoint
in interface java.sql.Connection
java.sql.SQLException
public int getHoldability() throws java.sql.SQLException
getHoldability
in interface java.sql.Connection
java.sql.SQLException
public void setHoldability(int m) throws java.sql.SQLException
setHoldability
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Array createArrayOf(java.lang.String arg0, java.lang.Object[] arg1) throws java.sql.SQLException
createArrayOf
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Blob createBlob() throws java.sql.SQLException
createBlob
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Clob createClob() throws java.sql.SQLException
createClob
in interface java.sql.Connection
java.sql.SQLException
public java.sql.NClob createNClob() throws java.sql.SQLException
createNClob
in interface java.sql.Connection
java.sql.SQLException
public java.sql.SQLXML createSQLXML() throws java.sql.SQLException
createSQLXML
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Struct createStruct(java.lang.String arg0, java.lang.Object[] arg1) throws java.sql.SQLException
createStruct
in interface java.sql.Connection
java.sql.SQLException
public java.util.Properties getClientInfo() throws java.sql.SQLException
getClientInfo
in interface java.sql.Connection
java.sql.SQLException
public java.lang.String getClientInfo(java.lang.String arg0) throws java.sql.SQLException
getClientInfo
in interface java.sql.Connection
java.sql.SQLException
public boolean isValid(int arg0) throws java.sql.SQLException
isValid
in interface java.sql.Connection
java.sql.SQLException
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
isWrapperFor
in interface java.sql.Wrapper
java.sql.SQLException
public void setClientInfo(java.util.Properties arg0) throws java.sql.SQLClientInfoException
setClientInfo
in interface java.sql.Connection
java.sql.SQLClientInfoException
public void setClientInfo(java.lang.String arg0, java.lang.String arg1) throws java.sql.SQLClientInfoException
setClientInfo
in interface java.sql.Connection
java.sql.SQLClientInfoException
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
unwrap
in interface java.sql.Wrapper
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |