com.alibaba.druid.pool
类 DruidPooledConnection

java.lang.Object
  继承者 com.alibaba.druid.pool.PoolableWrapper
      继承者 com.alibaba.druid.pool.DruidPooledConnection
所有已实现的接口:
Connection, Wrapper, PooledConnection

public class DruidPooledConnection
extends PoolableWrapper
implements PooledConnection, Connection

作者:
wenshao

字段摘要
static int MAX_RECORD_SQL_COUNT
           
 
从接口 java.sql.Connection 继承的字段
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
构造方法摘要
DruidPooledConnection(DruidConnectionHolder holder)
           
 
方法摘要
 void abandond()
           
 void abort(Executor executor)
           
 void addConnectionEventListener(ConnectionEventListener listener)
           
 void addStatementEventListener(StatementEventListener listener)
           
 void checkState()
           
 void clearWarnings()
           
 void close()
           
 void closePoolableStatement(DruidPooledPreparedStatement stmt)
           
 void commit()
           
 Array createArrayOf(String typeName, Object[] elements)
           
 Blob createBlob()
           
 Clob createClob()
           
 NClob createNClob()
           
 SQLXML createSQLXML()
           
 Statement createStatement()
           
 Statement createStatement(int resultSetType, int resultSetConcurrency)
           
 Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
           
 Struct createStruct(String typeName, Object[] attributes)
           
 void disable()
           
 void disable(Throwable error)
           
 boolean getAutoCommit()
           
 String getCatalog()
           
 Properties getClientInfo()
           
 String getClientInfo(String name)
           
 long getConnectedTimeNano()
           
 Connection getConnection()
           
 DruidConnectionHolder getConnectionHolder()
           
 StackTraceElement[] getConnectStackTrace()
           
 Throwable getDisableError()
           
 int getHoldability()
           
 DatabaseMetaData getMetaData()
           
 int getNetworkTimeout()
           
 Thread getOwnerThread()
           
 String getSchema()
           
 TransactionInfo getTransactionInfo()
           
 int getTransactionIsolation()
           
 Map<String,Class<?>> getTypeMap()
           
 SQLWarning getWarnings()
           
 SQLException handleException(Throwable t)
           
 boolean isAbandonded()
           
 boolean isClosed()
           
 boolean isDisable()
           
 boolean isOracle()
           
 boolean isReadOnly()
           
 boolean isTraceEnable()
           
 boolean isValid(int timeout)
           
 String nativeSQL(String sql)
           
 CallableStatement prepareCall(String sql)
           
 CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency)
           
 CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
           
 PreparedStatement prepareStatement(String sql)
           
 PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
           
 PreparedStatement prepareStatement(String sql, int[] columnIndexes)
           
 PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
           
 PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
           
 PreparedStatement prepareStatement(String sql, String[] columnNames)
           
 void recycle()
           
 void releaseSavepoint(Savepoint savepoint)
           
 void removeConnectionEventListener(ConnectionEventListener listener)
           
 void removeStatementEventListener(StatementEventListener listener)
           
 void rollback()
           
 void rollback(Savepoint savepoint)
           
 void setAutoCommit(boolean autoCommit)
           
 void setCatalog(String catalog)
           
 void setClientInfo(Properties properties)
           
 void setClientInfo(String name, String value)
           
 void setConnectedTimeNano()
           
 void setConnectedTimeNano(long connectedTimeNano)
           
 void setConnectStackTrace(StackTraceElement[] connectStackTrace)
           
 void setHoldability(int holdability)
           
 void setNetworkTimeout(Executor executor, int milliseconds)
           
 void setReadOnly(boolean readOnly)
           
 Savepoint setSavepoint()
           
 Savepoint setSavepoint(String name)
           
 void setSchema(String schema)
           
 void setTraceEnable(boolean traceEnable)
           
 void setTransactionIsolation(int level)
           
 void setTypeMap(Map<String,Class<?>> map)
           
 void syncClose()
           
 String toString()
           
 
从类 com.alibaba.druid.pool.PoolableWrapper 继承的方法
isWrapperFor, unwrap
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
从接口 java.sql.Wrapper 继承的方法
isWrapperFor, unwrap
 

字段详细信息

MAX_RECORD_SQL_COUNT

public static final int MAX_RECORD_SQL_COUNT
另请参见:
常量字段值
构造方法详细信息

DruidPooledConnection

public DruidPooledConnection(DruidConnectionHolder holder)
方法详细信息

getOwnerThread

public Thread getOwnerThread()

getConnectStackTrace

public StackTraceElement[] getConnectStackTrace()

setConnectStackTrace

public void setConnectStackTrace(StackTraceElement[] connectStackTrace)

getConnectedTimeNano

public long getConnectedTimeNano()

setConnectedTimeNano

public void setConnectedTimeNano()

setConnectedTimeNano

public void setConnectedTimeNano(long connectedTimeNano)

isTraceEnable

public boolean isTraceEnable()

setTraceEnable

public void setTraceEnable(boolean traceEnable)

handleException

public SQLException handleException(Throwable t)
                             throws SQLException
抛出:
SQLException

isOracle

public boolean isOracle()

closePoolableStatement

public void closePoolableStatement(DruidPooledPreparedStatement stmt)
                            throws SQLException
抛出:
SQLException

getConnectionHolder

public DruidConnectionHolder getConnectionHolder()

getConnection

public Connection getConnection()
指定者:
接口 PooledConnection 中的 getConnection

disable

public void disable()

disable

public void disable(Throwable error)

isDisable

public boolean isDisable()

close

public void close()
           throws SQLException
指定者:
接口 Connection 中的 close
指定者:
接口 PooledConnection 中的 close
抛出:
SQLException

syncClose

public void syncClose()
               throws SQLException
抛出:
SQLException

recycle

public void recycle()
             throws SQLException
抛出:
SQLException

prepareStatement

public PreparedStatement prepareStatement(String sql)
                                   throws SQLException
指定者:
接口 Connection 中的 prepareStatement
抛出:
SQLException

prepareStatement

public PreparedStatement prepareStatement(String sql,
                                          int resultSetType,
                                          int resultSetConcurrency)
                                   throws SQLException
指定者:
接口 Connection 中的 prepareStatement
抛出:
SQLException

prepareStatement

public PreparedStatement prepareStatement(String sql,
                                          int resultSetType,
                                          int resultSetConcurrency,
                                          int resultSetHoldability)
                                   throws SQLException
指定者:
接口 Connection 中的 prepareStatement
抛出:
SQLException

prepareStatement

public PreparedStatement prepareStatement(String sql,
                                          int[] columnIndexes)
                                   throws SQLException
指定者:
接口 Connection 中的 prepareStatement
抛出:
SQLException

prepareStatement

public PreparedStatement prepareStatement(String sql,
                                          String[] columnNames)
                                   throws SQLException
指定者:
接口 Connection 中的 prepareStatement
抛出:
SQLException

prepareStatement

public PreparedStatement prepareStatement(String sql,
                                          int autoGeneratedKeys)
                                   throws SQLException
指定者:
接口 Connection 中的 prepareStatement
抛出:
SQLException

prepareCall

public CallableStatement prepareCall(String sql)
                              throws SQLException
指定者:
接口 Connection 中的 prepareCall
抛出:
SQLException

prepareCall

public CallableStatement prepareCall(String sql,
                                     int resultSetType,
                                     int resultSetConcurrency,
                                     int resultSetHoldability)
                              throws SQLException
指定者:
接口 Connection 中的 prepareCall
抛出:
SQLException

prepareCall

public CallableStatement prepareCall(String sql,
                                     int resultSetType,
                                     int resultSetConcurrency)
                              throws SQLException
指定者:
接口 Connection 中的 prepareCall
抛出:
SQLException

createStatement

public Statement createStatement()
                          throws SQLException
指定者:
接口 Connection 中的 createStatement
抛出:
SQLException

createStatement

public Statement createStatement(int resultSetType,
                                 int resultSetConcurrency,
                                 int resultSetHoldability)
                          throws SQLException
指定者:
接口 Connection 中的 createStatement
抛出:
SQLException

createStatement

public Statement createStatement(int resultSetType,
                                 int resultSetConcurrency)
                          throws SQLException
指定者:
接口 Connection 中的 createStatement
抛出:
SQLException

nativeSQL

public String nativeSQL(String sql)
                 throws SQLException
指定者:
接口 Connection 中的 nativeSQL
抛出:
SQLException

setAutoCommit

public void setAutoCommit(boolean autoCommit)
                   throws SQLException
指定者:
接口 Connection 中的 setAutoCommit
抛出:
SQLException

getAutoCommit

public boolean getAutoCommit()
                      throws SQLException
指定者:
接口 Connection 中的 getAutoCommit
抛出:
SQLException

commit

public void commit()
            throws SQLException
指定者:
接口 Connection 中的 commit
抛出:
SQLException

getTransactionInfo

public TransactionInfo getTransactionInfo()

rollback

public void rollback()
              throws SQLException
指定者:
接口 Connection 中的 rollback
抛出:
SQLException

setSavepoint

public Savepoint setSavepoint(String name)
                       throws SQLException
指定者:
接口 Connection 中的 setSavepoint
抛出:
SQLException

rollback

public void rollback(Savepoint savepoint)
              throws SQLException
指定者:
接口 Connection 中的 rollback
抛出:
SQLException

releaseSavepoint

public void releaseSavepoint(Savepoint savepoint)
                      throws SQLException
指定者:
接口 Connection 中的 releaseSavepoint
抛出:
SQLException

createClob

public Clob createClob()
                throws SQLException
指定者:
接口 Connection 中的 createClob
抛出:
SQLException

isClosed

public boolean isClosed()
                 throws SQLException
指定者:
接口 Connection 中的 isClosed
抛出:
SQLException

isAbandonded

public boolean isAbandonded()

getMetaData

public DatabaseMetaData getMetaData()
                             throws SQLException
指定者:
接口 Connection 中的 getMetaData
抛出:
SQLException

setReadOnly

public void setReadOnly(boolean readOnly)
                 throws SQLException
指定者:
接口 Connection 中的 setReadOnly
抛出:
SQLException

isReadOnly

public boolean isReadOnly()
                   throws SQLException
指定者:
接口 Connection 中的 isReadOnly
抛出:
SQLException

setCatalog

public void setCatalog(String catalog)
                throws SQLException
指定者:
接口 Connection 中的 setCatalog
抛出:
SQLException

getCatalog

public String getCatalog()
                  throws SQLException
指定者:
接口 Connection 中的 getCatalog
抛出:
SQLException

setTransactionIsolation

public void setTransactionIsolation(int level)
                             throws SQLException
指定者:
接口 Connection 中的 setTransactionIsolation
抛出:
SQLException

getTransactionIsolation

public int getTransactionIsolation()
                            throws SQLException
指定者:
接口 Connection 中的 getTransactionIsolation
抛出:
SQLException

getWarnings

public SQLWarning getWarnings()
                       throws SQLException
指定者:
接口 Connection 中的 getWarnings
抛出:
SQLException

clearWarnings

public void clearWarnings()
                   throws SQLException
指定者:
接口 Connection 中的 clearWarnings
抛出:
SQLException

getTypeMap

public Map<String,Class<?>> getTypeMap()
                                throws SQLException
指定者:
接口 Connection 中的 getTypeMap
抛出:
SQLException

setTypeMap

public void setTypeMap(Map<String,Class<?>> map)
                throws SQLException
指定者:
接口 Connection 中的 setTypeMap
抛出:
SQLException

setHoldability

public void setHoldability(int holdability)
                    throws SQLException
指定者:
接口 Connection 中的 setHoldability
抛出:
SQLException

getHoldability

public int getHoldability()
                   throws SQLException
指定者:
接口 Connection 中的 getHoldability
抛出:
SQLException

setSavepoint

public Savepoint setSavepoint()
                       throws SQLException
指定者:
接口 Connection 中的 setSavepoint
抛出:
SQLException

createBlob

public Blob createBlob()
                throws SQLException
指定者:
接口 Connection 中的 createBlob
抛出:
SQLException

createNClob

public NClob createNClob()
                  throws SQLException
指定者:
接口 Connection 中的 createNClob
抛出:
SQLException

createSQLXML

public SQLXML createSQLXML()
                    throws SQLException
指定者:
接口 Connection 中的 createSQLXML
抛出:
SQLException

isValid

public boolean isValid(int timeout)
                throws SQLException
指定者:
接口 Connection 中的 isValid
抛出:
SQLException

setClientInfo

public void setClientInfo(String name,
                          String value)
                   throws SQLClientInfoException
指定者:
接口 Connection 中的 setClientInfo
抛出:
SQLClientInfoException

setClientInfo

public void setClientInfo(Properties properties)
                   throws SQLClientInfoException
指定者:
接口 Connection 中的 setClientInfo
抛出:
SQLClientInfoException

getClientInfo

public String getClientInfo(String name)
                     throws SQLException
指定者:
接口 Connection 中的 getClientInfo
抛出:
SQLException

getClientInfo

public Properties getClientInfo()
                         throws SQLException
指定者:
接口 Connection 中的 getClientInfo
抛出:
SQLException

createArrayOf

public Array createArrayOf(String typeName,
                           Object[] elements)
                    throws SQLException
指定者:
接口 Connection 中的 createArrayOf
抛出:
SQLException

createStruct

public Struct createStruct(String typeName,
                           Object[] attributes)
                    throws SQLException
指定者:
接口 Connection 中的 createStruct
抛出:
SQLException

addConnectionEventListener

public void addConnectionEventListener(ConnectionEventListener listener)
指定者:
接口 PooledConnection 中的 addConnectionEventListener

removeConnectionEventListener

public void removeConnectionEventListener(ConnectionEventListener listener)
指定者:
接口 PooledConnection 中的 removeConnectionEventListener

addStatementEventListener

public void addStatementEventListener(StatementEventListener listener)
指定者:
接口 PooledConnection 中的 addStatementEventListener

removeStatementEventListener

public void removeStatementEventListener(StatementEventListener listener)
指定者:
接口 PooledConnection 中的 removeStatementEventListener

getDisableError

public Throwable getDisableError()

checkState

public void checkState()
                throws SQLException
抛出:
SQLException

toString

public String toString()
覆盖:
Object 中的 toString

setSchema

public void setSchema(String schema)
               throws SQLException
抛出:
SQLException

getSchema

public String getSchema()
                 throws SQLException
抛出:
SQLException

abort

public void abort(Executor executor)
           throws SQLException
抛出:
SQLException

setNetworkTimeout

public void setNetworkTimeout(Executor executor,
                              int milliseconds)
                       throws SQLException
抛出:
SQLException

getNetworkTimeout

public int getNetworkTimeout()
                      throws SQLException
抛出:
SQLException

abandond

public void abandond()


Copyright © 2013 Alibaba Group. All Rights Reserved.