public interface ProxyConnectionIF extends ConnectionInfoIF
MARK_FOR_EXPIRY, MARK_FOR_USE, STATUS_ACTIVE, STATUS_AVAILABLE, STATUS_NULL, STATUS_OFFLINE| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Doesn't really close the connection, just puts it back in the pool.
|
Connection |
getConnection()
The real, delegate connection that we are using
|
ConnectionPoolDefinitionIF |
getDefinition() |
String |
getLastSqlCall()
Get the most recent of all the
ConnectionInfoIF.getSqlCalls() |
int |
getReasonCode()
Get the reason why this connection is
marked |
String |
getReasonForMark()
Why this connection is marked (for instance, if a thread has
marked it for expiry then it's nice to know why)
|
boolean |
isActive() |
boolean |
isAvailable() |
boolean |
isMarkedForExpiry()
Whether this connection is due for expiry
|
boolean |
isNull() |
boolean |
isOffline() |
boolean |
isReallyClosed()
Find out if the delegated connection is close.
|
void |
markForExpiry(String reason)
Mark this connection for expiry (destruction) as soon as it stops
being active.
|
void |
reallyClose()
Really close the connection, as opposed to just putting it back
in the pool.
|
void |
registerClosedStatement(Statement statement)
Notify that a statement has been closed and won't need closing
when the connection is returned to the poo.
|
void |
setRequester(String requester) |
boolean |
setStatus(int newStatus)
Forces the new status regardless of the old state
|
boolean |
setStatus(int oldStatus,
int newStatus)
Changes the status and lets the ConnectionPool know so that it
can keep count of how many connections are at each status.
|
getAge, getBirthDate, getBirthTime, getDelegateHashcode, getDelegateUrl, getId, getMark, getProxyHashcode, getRequester, getSqlCalls, getStatus, getTimeLastStartActive, getTimeLastStopActivecompareToboolean setStatus(int oldStatus,
int newStatus)
oldStatus - the expected existing status. if the existing
status is not this value then no change is made and false is returned.newStatus - the status to change toboolean setStatus(int newStatus)
newStatus - the status to change tosetStatus(int, int)void markForExpiry(String reason)
reason - why we are marking this connectionisMarkedForExpiry()boolean isMarkedForExpiry()
markForExpiry(java.lang.String)String getReasonForMark()
Connection getConnection()
boolean isNull()
boolean isAvailable()
boolean isActive()
boolean isOffline()
void reallyClose()
throws SQLException
SQLExceptionvoid setRequester(String requester)
void close()
throws SQLException
SQLExceptionConnection.close()void registerClosedStatement(Statement statement)
statement - the statement that has just been closedboolean isReallyClosed()
throws SQLException
SQLException - if anything went wrongConnectionPoolDefinitionIF getDefinition()
String getLastSqlCall()
ConnectionInfoIF.getSqlCalls()int getReasonCode()
markedConnectionListenerIF.MAXIMUM_ACTIVE_TIME_EXPIRED,
ConnectionListenerIF.HOUSE_KEEPER_TEST_FAIL,
ConnectionListenerIF.FATAL_SQL_EXCEPTION_DETECTED,
ConnectionListenerIF.MANUAL_EXPIRY,
ConnectionListenerIF.MAXIMUM_CONNECTION_LIFETIME_EXCEEDED,
ConnectionListenerIF.RESET_FAIL,
ConnectionListenerIF.SHUTDOWN, or
ConnectionListenerIF.VALIDATION_FAILCopyright © 2024. All rights reserved.