Connection继承和接口的区别中isClosed 和 isValid 的区别

ConnectionHandle
您的浏览器已禁用 JavaScript。
类 ConnectionHandle
java.lang.Object
com.jolbox.bonecp.ConnectionHandle
所有已实现的接口:
java.lang.AutoCloseable, java.sql.Connection, java.sql.Wrapper
public class ConnectionHandle
extends java.lang.Object
implements java.sql.Connection
Connection handle wrapper around a JDBC connection.
限定符和类型
字段和说明
Prepared Statement Cache.
private static java.lang.String
Exception message.
private java.sql.Connection
Connection handle.
private long
Time when this connection was created.
Handle to the connection hook as defined in the config.
private long
Last time we sent a reset to this connection.
private long
Last time this connection was used by an application.
private boolean
If true, connection tracking is disabled in the config.
private java.lang.Object
An opaque handle for an application to use in any way it deems fit.
private boolean
If true, give warnings if application tried to issue a close twice (for debugging only).
private java.lang.String
exception trace if doubleCloseCheck is enabled.
private java.util.Map&java.sql.Connection,java.lang.ref.Reference&&&
Handle to pool.finalizationRefs.
private boolean
If true, connection is currently playing back a saved transaction.
private static java.lang.String
Exception message.
private static Logger
Logger handle.
protected boolean
If true, we've called close() on this connection.
private boolean
If true, log sql statements.
private long
Configured max connection age.
Original partition.
Pool handle.
protected boolean
If true, this connection might have failed communicating with the
Prepared Statement Cache.
Map of translations + result from last recovery.
private java.util.List&&
The recorded actions list used to replay the transaction.
private static
SQL Failure codes indicating the database is broken/died (and thus kill off remaining connections).
private static java.lang.String
Exception message.
protected boolean
Set to true if we have statement caching enabled.
Statistics handle.
private boolean
if true, we care about statistics.
protected java.lang.Thread
Keep track of the thread.
private java.lang.Thread
Pointer to a thread that is monitoring this connection (for the case where closeConnectionWatch) is
protected java.lang.String
Connection url.
从接口继承的字段&java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
构造器概要
构造器和说明
(java.sql.Connection&connection,
&preparedStatementCache,
&callableStatementCache,
Private constructor used solely for unit testing.
(java.lang.String&url,
java.lang.String&username,
java.lang.String&password,
Connection wrapper constructor
限定符和类型
方法和说明
private void
Checks if the connection is (logically) closed and throws an exception if it is.
protected void
(boolean&internalClose)
Clears out the statement handles.
Release the connection if called.
java.sql.Array
(java.lang.String&typeName,
java.lang.Object[]&elements)&
java.sql.Blob
java.sql.Clob
java.sql.NClob
java.sql.SQLXML
java.sql.Statement
java.sql.Statement
(int&resultSetType,
int&resultSetConcurrency)&
java.sql.Statement
(int&resultSetType,
int&resultSetConcurrency,
int&resultSetHoldability)&
java.sql.Struct
(java.lang.String&typeName,
java.lang.Object[]&attributes)&
java.lang.String
java.util.Properties
java.lang.String
(java.lang.String&name)&
please use
Returns the connectionCreationTime field.
Returns the configured connection hook object.
Please use
java.lang.Object
Returns a debug handle as previously set by an application
java.sql.Connection
Returns the internal connection as obtained via the JDBC driver.
java.sql.DatabaseMetaData
Gets the partition this came from.
Returns a handle to the global pool from where this connection was obtained.
java.lang.Object
This method will be intercepted by the proxy if it is enabled to return the internal target.
java.sql.Connection
java.util.List&&
Returns transaction history log
java.lang.Thread
Returns the thread that is currently utilizing this connection.
java.lang.Thread
Returns the thread watching over this connection.
java.util.Map&java.lang.String,java.lang.Class&?&&
java.sql.SQLWarning
protected void
Close off the connection.
Returns true if this connection has been (logically) closed.
Sends a test query to the underlying connection and return true if connection is alive.
Returns true if the given connection has exceeded the maxConnectionAge.
protected boolean
(long&currentTime)
Returns true if the given connection has exceeded the maxConnectionAge.
protected boolean
Returns true if logging of statements is enabled
Gets true if connection has triggered an exception at some point.
(int&timeout)&
(java.lang.Class&?&&iface)&
protected java.sql.SQLException
(java.sql.SQLException&e)
Given an exception, flag the connection (or database) as being potentially broken.
java.lang.String
(java.lang.String&sql)&
protected java.sql.Connection
Obtains a database connection, retrying if necessary.
java.sql.CallableStatement
(java.lang.String&sql)&
java.sql.CallableStatement
(java.lang.String&sql,
int&resultSetType,
int&resultSetConcurrency)&
java.sql.CallableStatement
(java.lang.String&sql,
int&resultSetType,
int&resultSetConcurrency,
int&resultSetHoldability)&
java.sql.PreparedStatement
(java.lang.String&sql)&
java.sql.PreparedStatement
(java.lang.String&sql,
int&autoGeneratedKeys)&
java.sql.PreparedStatement
(java.lang.String&sql,
int[]&columnIndexes)&
java.sql.PreparedStatement
(java.lang.String&sql,
int&resultSetType,
int&resultSetConcurrency)&
java.sql.PreparedStatement
(java.lang.String&sql,
int&resultSetType,
int&resultSetConcurrency,
int&resultSetHoldability)&
java.sql.PreparedStatement
(java.lang.String&sql,
java.lang.String[]&columnNames)&
(java.sql.Savepoint&savepoint)&
protected void
Renews this connection, i.e.
(java.sql.Savepoint&savepoint)&
Sends any configured SQL init statement.
(boolean&autoCommit)&
(java.lang.String&catalog)&
(java.util.Properties&properties)&
(java.lang.String&name,
java.lang.String&value)&
protected void
(long&connectionLastReset)&
protected void
(long&connectionLastUsed)&
(java.lang.Object&debugHandle)
Sets a debugHandle, an object that is not used by the connection pool at all but may be set by an application to track
this particular connection handle for any purpose it deems fit.
(int&holdability)&
protected void
(boolean&inReplayMode)&
(java.sql.Connection&rawConnection)
Sets the internal connection to use.
(boolean&logStatementsEnabled)
Enable or disable logging of this connection.
protected void
(&originatingPartition)
Sets Originating partition
(boolean&readOnly)&
protected void
(java.util.List&&&replayLog)
Sets the transaction history log
java.sql.Savepoint
java.sql.Savepoint
(java.lang.String&name)&
protected void
(java.lang.Thread&threadWatch)
Sets the thread watching over this connection.
(int&level)&
(java.util.Map&java.lang.String,java.lang.Class&?&&&map)&
(java.lang.Class&T&&iface)&
从类继承的方法&java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法&java.sql.Connection
abort, getNetworkTimeout, getSchema, setNetworkTimeout, setSchema
字段详细资料
STATEMENT_NOT_CLOSED
private static final&java.lang.String STATEMENT_NOT_CLOSED
Exception message.
LOG_ERROR_MESSAGE
private static final&java.lang.String LOG_ERROR_MESSAGE
Exception message.
CLOSED_TWICE_EXCEPTION_MESSAGE
private static final&java.lang.String CLOSED_TWICE_EXCEPTION_MESSAGE
Exception message.
connection
private&java.sql.Connection connection
Connection handle.
connectionLastUsedInMs
private&long connectionLastUsedInMs
Last time this connection was used by an application.
connectionLastResetInMs
private&long connectionLastResetInMs
Last time we sent a reset to this connection.
connectionCreationTimeInMs
private&long connectionCreationTimeInMs
Time when this connection was created.
private& pool
Pool handle.
possiblyBroken
protected&boolean possiblyBroken
If true, this connection might have failed communicating with the
database. We assume that exceptions should be rare here i.e. the normal
case is assumed to succeed.
logicallyClosed
protected&boolean logicallyClosed
If true, we've called close() on this connection.
originatingPartition
private& originatingPartition
Original partition.
preparedStatementCache
private& preparedStatementCache
Prepared Statement Cache.
callableStatementCache
private& callableStatementCache
Prepared Statement Cache.
private static&Logger logger
Logger handle.
debugHandle
private&java.lang.Object debugHandle
An opaque handle for an application to use in any way it deems fit.
connectionHook
private& connectionHook
Handle to the connection hook as defined in the config.
doubleCloseCheck
private&boolean doubleCloseCheck
If true, give warnings if application tried to issue a close twice (for debugging only).
doubleCloseException
private volatile&java.lang.String doubleCloseException
exception trace if doubleCloseCheck is enabled.
logStatementsEnabled
private&boolean logStatementsEnabled
If true, log sql statements.
statementCachingEnabled
protected&boolean statementCachingEnabled
Set to true if we have statement caching enabled.
private&java.util.List&& replayLog
The recorded actions list used to replay the transaction.
inReplayMode
private&boolean inReplayMode
If true, connection is currently playing back a saved transaction.
recoveryResult
protected& recoveryResult
Map of translations + result from last recovery.
protected&java.lang.String url
Connection url.
threadUsingConnection
protected&java.lang.Thread threadUsingConnection
Keep track of the thread.
maxConnectionAgeInMs
private&long maxConnectionAgeInMs
Configured max connection age.
statisticsEnabled
private&boolean statisticsEnabled
if true, we care about statistics.
statistics
private& statistics
Statistics handle.
threadWatch
private volatile&java.lang.Thread threadWatch
Pointer to a thread that is monitoring this connection (for the case where closeConnectionWatch) is
finalizableRefs
private&java.util.Map&java.sql.Connection,java.lang.ref.Reference&&& finalizableRefs
Handle to pool.finalizationRefs.
connectionTrackingDisabled
private&boolean connectionTrackingDisabled
If true, connection tracking is disabled in the config.
sqlStateDBFailureCodes
private static final& sqlStateDBFailureCodes
SQL Failure codes indicating the database is broken/died (and thus kill off remaining connections).
Anything else will be taken as the *connection* (not the db) being broken. Note: 08S01 is considered as connection failure in MySQL.
57P01 means that postgresql was restarted.
构造器详细资料
ConnectionHandle
public&ConnectionHandle(java.lang.String&url,
java.lang.String&username,
java.lang.String&password,
throws java.sql.SQLException
Connection wrapper constructor
参数:url - JDBC connection stringusername - user to usepassword - password for dbpool - pool handle.
java.sql.SQLException - on error
ConnectionHandle
public&ConnectionHandle(java.sql.Connection&connection,
&preparedStatementCache,
&callableStatementCache,
Private constructor used solely for unit testing.
参数:connection - preparedStatementCache - callableStatementCache - pool -
方法详细资料
obtainInternalConnection
protected&java.sql.Connection&obtainInternalConnection()
throws java.sql.SQLException
Obtains a database connection, retrying if necessary.
返回:A DB connection.
java.sql.SQLException
sendInitSQL
public&void&sendInitSQL()
throws java.sql.SQLException
Sends any configured SQL init statement.
java.sql.SQLException - on error
markPossiblyBroken
protected&java.sql.SQLException&markPossiblyBroken(java.sql.SQLException&e)
Given an exception, flag the connection (or database) as being potentially broken. If the exception is a data-specific exception,
do nothing except throw it back to the application.
参数:e - SQLException e
返回:SQLException for further processing
clearWarnings
public&void&clearWarnings()
throws java.sql.SQLException
clearWarnings&在接口中&java.sql.Connection
java.sql.SQLException
checkClosed
private&void&checkClosed()
throws java.sql.SQLException
Checks if the connection is (logically) closed and throws an exception if it is.
java.sql.SQLException - on error
public&void&close()
throws java.sql.SQLException
Release the connection if called.
close&在接口中&java.lang.AutoCloseable
close&在接口中&java.sql.Connection
java.sql.SQLException - Never really thrown
internalClose
protected&void&internalClose()
throws java.sql.SQLException
Close off the connection.
java.sql.SQLException
public&void&commit()
throws java.sql.SQLException
commit&在接口中&java.sql.Connection
java.sql.SQLException
getClientInfo
public&java.util.Properties&getClientInfo()
throws java.sql.SQLException
getClientInfo&在接口中&java.sql.Connection
java.sql.SQLException
getClientInfo
public&java.lang.String&getClientInfo(java.lang.String&name)
throws java.sql.SQLException
getClientInfo&在接口中&java.sql.Connection
java.sql.SQLException
public&boolean&isValid(int&timeout)
throws java.sql.SQLException
isValid&在接口中&java.sql.Connection
java.sql.SQLException
isWrapperFor
public&boolean&isWrapperFor(java.lang.Class&?&&iface)
throws java.sql.SQLException
isWrapperFor&在接口中&java.sql.Wrapper
java.sql.SQLException
public&&T&&T&unwrap(java.lang.Class&T&&iface)
throws java.sql.SQLException
unwrap&在接口中&java.sql.Wrapper
java.sql.SQLException
setClientInfo
public&void&setClientInfo(java.util.Properties&properties)
throws java.sql.SQLClientInfoException
setClientInfo&在接口中&java.sql.Connection
java.sql.SQLClientInfoException
setClientInfo
public&void&setClientInfo(java.lang.String&name,
java.lang.String&value)
throws java.sql.SQLClientInfoException
setClientInfo&在接口中&java.sql.Connection
java.sql.SQLClientInfoException
createStruct
public&java.sql.Struct&createStruct(java.lang.String&typeName,
java.lang.Object[]&attributes)
throws java.sql.SQLException
createStruct&在接口中&java.sql.Connection
java.sql.SQLException
createArrayOf
public&java.sql.Array&createArrayOf(java.lang.String&typeName,
java.lang.Object[]&elements)
throws java.sql.SQLException
createArrayOf&在接口中&java.sql.Connection
java.sql.SQLException
createBlob
public&java.sql.Blob&createBlob()
throws java.sql.SQLException
createBlob&在接口中&java.sql.Connection
java.sql.SQLException
createClob
public&java.sql.Clob&createClob()
throws java.sql.SQLException
createClob&在接口中&java.sql.Connection
java.sql.SQLException
createNClob
public&java.sql.NClob&createNClob()
throws java.sql.SQLException
createNClob&在接口中&java.sql.Connection
java.sql.SQLException
createSQLXML
public&java.sql.SQLXML&createSQLXML()
throws java.sql.SQLException
createSQLXML&在接口中&java.sql.Connection
java.sql.SQLException
createStatement
public&java.sql.Statement&createStatement()
throws java.sql.SQLException
createStatement&在接口中&java.sql.Connection
java.sql.SQLException
createStatement
public&java.sql.Statement&createStatement(int&resultSetType,
int&resultSetConcurrency)
throws java.sql.SQLException
createStatement&在接口中&java.sql.Connection
java.sql.SQLException
createStatement
public&java.sql.Statement&createStatement(int&resultSetType,
int&resultSetConcurrency,
int&resultSetHoldability)
throws java.sql.SQLException
createStatement&在接口中&java.sql.Connection
java.sql.SQLException
getAutoCommit
public&boolean&getAutoCommit()
throws java.sql.SQLException
getAutoCommit&在接口中&java.sql.Connection
java.sql.SQLException
getCatalog
public&java.lang.String&getCatalog()
throws java.sql.SQLException
getCatalog&在接口中&java.sql.Connection
java.sql.SQLException
getHoldability
public&int&getHoldability()
throws java.sql.SQLException
getHoldability&在接口中&java.sql.Connection
java.sql.SQLException
getMetaData
public&java.sql.DatabaseMetaData&getMetaData()
throws java.sql.SQLException
getMetaData&在接口中&java.sql.Connection
java.sql.SQLException
getTransactionIsolation
public&int&getTransactionIsolation()
throws java.sql.SQLException
getTransactionIsolation&在接口中&java.sql.Connection
java.sql.SQLException
getTypeMap
public&java.util.Map&java.lang.String,java.lang.Class&?&&&getTypeMap()
throws java.sql.SQLException
getTypeMap&在接口中&java.sql.Connection
java.sql.SQLException
getWarnings
public&java.sql.SQLWarning&getWarnings()
throws java.sql.SQLException
getWarnings&在接口中&java.sql.Connection
java.sql.SQLException
public&boolean&isClosed()
Returns true if this connection has been (logically) closed.
isClosed&在接口中&java.sql.Connection
返回:the logicallyClosed setting.
isReadOnly
public&boolean&isReadOnly()
throws java.sql.SQLException
isReadOnly&在接口中&java.sql.Connection
java.sql.SQLException
public&java.lang.String&nativeSQL(java.lang.String&sql)
throws java.sql.SQLException
nativeSQL&在接口中&java.sql.Connection
java.sql.SQLException
prepareCall
public&java.sql.CallableStatement&prepareCall(java.lang.String&sql)
throws java.sql.SQLException
prepareCall&在接口中&java.sql.Connection
java.sql.SQLException
prepareCall
public&java.sql.CallableStatement&prepareCall(java.lang.String&sql,
int&resultSetType,
int&resultSetConcurrency)
throws java.sql.SQLException
prepareCall&在接口中&java.sql.Connection
java.sql.SQLException
prepareCall
public&java.sql.CallableStatement&prepareCall(java.lang.String&sql,
int&resultSetType,
int&resultSetConcurrency,
int&resultSetHoldability)
throws java.sql.SQLException
prepareCall&在接口中&java.sql.Connection
java.sql.SQLException
prepareStatement
public&java.sql.PreparedStatement&prepareStatement(java.lang.String&sql)
throws java.sql.SQLException
prepareStatement&在接口中&java.sql.Connection
java.sql.SQLException
prepareStatement
public&java.sql.PreparedStatement&prepareStatement(java.lang.String&sql,
int&autoGeneratedKeys)
throws java.sql.SQLException
prepareStatement&在接口中&java.sql.Connection
java.sql.SQLException
prepareStatement
public&java.sql.PreparedStatement&prepareStatement(java.lang.String&sql,
int[]&columnIndexes)
throws java.sql.SQLException
prepareStatement&在接口中&java.sql.Connection
java.sql.SQLException
prepareStatement
public&java.sql.PreparedStatement&prepareStatement(java.lang.String&sql,
java.lang.String[]&columnNames)
throws java.sql.SQLException
prepareStatement&在接口中&java.sql.Connection
java.sql.SQLException
prepareStatement
public&java.sql.PreparedStatement&prepareStatement(java.lang.String&sql,
int&resultSetType,
int&resultSetConcurrency)
throws java.sql.SQLException
prepareStatement&在接口中&java.sql.Connection
java.sql.SQLException
prepareStatement
public&java.sql.PreparedStatement&prepareStatement(java.lang.String&sql,
int&resultSetType,
int&resultSetConcurrency,
int&resultSetHoldability)
throws java.sql.SQLException
prepareStatement&在接口中&java.sql.Connection
java.sql.SQLException
releaseSavepoint
public&void&releaseSavepoint(java.sql.Savepoint&savepoint)
throws java.sql.SQLException
releaseSavepoint&在接口中&java.sql.Connection
java.sql.SQLException
public&void&rollback()
throws java.sql.SQLException
rollback&在接口中&java.sql.Connection
java.sql.SQLException
public&void&rollback(java.sql.Savepoint&savepoint)
throws java.sql.SQLException
rollback&在接口中&java.sql.Connection
java.sql.SQLException
setAutoCommit
public&void&setAutoCommit(boolean&autoCommit)
throws java.sql.SQLException
setAutoCommit&在接口中&java.sql.Connection
java.sql.SQLException
setCatalog
public&void&setCatalog(java.lang.String&catalog)
throws java.sql.SQLException
setCatalog&在接口中&java.sql.Connection
java.sql.SQLException
setHoldability
public&void&setHoldability(int&holdability)
throws java.sql.SQLException
setHoldability&在接口中&java.sql.Connection
java.sql.SQLException
setReadOnly
public&void&setReadOnly(boolean&readOnly)
throws java.sql.SQLException
setReadOnly&在接口中&java.sql.Connection
java.sql.SQLException
setSavepoint
public&java.sql.Savepoint&setSavepoint()
throws java.sql.SQLException
setSavepoint&在接口中&java.sql.Connection
java.sql.SQLException
setSavepoint
public&java.sql.Savepoint&setSavepoint(java.lang.String&name)
throws java.sql.SQLException
setSavepoint&在接口中&java.sql.Connection
java.sql.SQLException
setTransactionIsolation
public&void&setTransactionIsolation(int&level)
throws java.sql.SQLException
setTransactionIsolation&在接口中&java.sql.Connection
java.sql.SQLException
setTypeMap
public&void&setTypeMap(java.util.Map&java.lang.String,java.lang.Class&?&&&map)
throws java.sql.SQLException
setTypeMap&在接口中&java.sql.Connection
java.sql.SQLException
getConnectionLastUsedInMs
public&long&getConnectionLastUsedInMs()
返回:the connectionLastUsed
getConnectionLastUsed
@Deprecated
public&long&getConnectionLastUsed()
已过时。&Use
Deprecated. Use
返回:the connectionLastUsed
setConnectionLastUsedInMs
protected&void&setConnectionLastUsedInMs(long&connectionLastUsed)
参数:connectionLastUsed - the connectionLastUsed to set
getConnectionLastResetInMs
public&long&getConnectionLastResetInMs()
返回:the connectionLastReset
getConnectionLastReset
@Deprecated
public&long&getConnectionLastReset()
已过时。&Please use
Deprecated. Use
返回:the connectionLastReset
setConnectionLastResetInMs
protected&void&setConnectionLastResetInMs(long&connectionLastReset)
参数:connectionLastReset - the connectionLastReset to set
isPossiblyBroken
public&boolean&isPossiblyBroken()
Gets true if connection has triggered an exception at some point.
返回:true if the connection has triggered an error
getOriginatingPartition
public&&getOriginatingPartition()
Gets the partition this came from.
返回:the partition this came from
setOriginatingPartition
protected&void&setOriginatingPartition(&originatingPartition)
Sets Originating partition
参数:originatingPartition - to set
renewConnection
protected&void&renewConnection()
Renews this connection, i.e. Sets this connection to be logically open
(although it was never really physically closed)
clearStatementCaches
protected&void&clearStatementCaches(boolean&internalClose)
Clears out the statement handles.
参数:internalClose - if true, close the inner statement handle too.
getDebugHandle
public&java.lang.Object&getDebugHandle()
Returns a debug handle as previously set by an application
返回:DebugHandle
setDebugHandle
public&void&setDebugHandle(java.lang.Object&debugHandle)
Sets a debugHandle, an object that is not used by the connection pool at all but may be set by an application to track
this particular connection handle for any purpose it deems fit.
参数:debugHandle - any object.
getRawConnection
@Deprecated
public&java.sql.Connection&getRawConnection()
Deprecated. Please use getInternalConnection() instead.
返回:the raw connection
getInternalConnection
public&java.sql.Connection&getInternalConnection()
Returns the internal connection as obtained via the JDBC driver.
返回:the raw connection
getConnectionHook
public&&getConnectionHook()
Returns the configured connection hook object.
返回:the connectionHook that was set in the config
isLogStatementsEnabled
public&boolean&isLogStatementsEnabled()
Returns true if logging of statements is enabled
返回:logStatementsEnabled status
setLogStatementsEnabled
public&void&setLogStatementsEnabled(boolean&logStatementsEnabled)
Enable or disable logging of this connection.
参数:logStatementsEnabled - true to enable logging, false to disable.
isInReplayMode
protected&boolean&isInReplayMode()
返回:the inReplayMode
setInReplayMode
protected&void&setInReplayMode(boolean&inReplayMode)
参数:inReplayMode - the inReplayMode to set
isConnectionAlive
public&boolean&isConnectionAlive()
Sends a test query to the underlying connection and return true if connection is alive.
返回:True if connection is valid, false otherwise.
setInternalConnection
public&void&setInternalConnection(java.sql.Connection&rawConnection)
Sets the internal connection to use. Be careful how to use this method, normally you should never need it! This is here
for odd use cases only!
参数:rawConnection - to set
public&&getPool()
Returns a handle to the global pool from where this connection was obtained.
返回:BoneCP handle
getReplayLog
public&java.util.List&&&getReplayLog()
Returns transaction history log
返回:replay list
setReplayLog
protected&void&setReplayLog(java.util.List&&&replayLog)
Sets the transaction history log
参数:replayLog - to set.
getProxyTarget
public&java.lang.Object&getProxyTarget()
This method will be intercepted by the proxy if it is enabled to return the internal target.
返回:the target.
getThreadUsingConnection
public&java.lang.Thread&getThreadUsingConnection()
Returns the thread that is currently utilizing this connection.
返回:the threadUsingConnection
getConnectionCreationTime
@Deprecated
public&long&getConnectionCreationTime()
已过时。&please use
Deprecated. Use
返回:connectionCreationTime
getConnectionCreationTimeInMs
public&long&getConnectionCreationTimeInMs()
Returns the connectionCreationTime field.
返回:connectionCreationTime
public&boolean&isExpired()
Returns true if the given connection has exceeded the maxConnectionAge.
返回:true if the connection has expired.
protected&boolean&isExpired(long&currentTime)
Returns true if the given connection has exceeded the maxConnectionAge.
参数:currentTime - current time to use.
返回:true if the connection has expired.
setThreadWatch
protected&void&setThreadWatch(java.lang.Thread&threadWatch)
Sets the thread watching over this connection.
参数:threadWatch - the threadWatch to set
getThreadWatch
public&java.lang.Thread&getThreadWatch()
Returns the thread watching over this connection.
返回:threadWatch}

我要回帖

更多关于 抽象类与接口的区别 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信