|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Contains most of the functionality that we require to manipilate the connection. The subclass of this defines how we delegate to the real connection.
Field Summary |
Fields inherited from interface org.logicalcobwebs.proxool.ConnectionInfoIF |
MARK_FOR_EXPIRY, MARK_FOR_USE, STATUS_ACTIVE, STATUS_AVAILABLE, STATUS_NULL, STATUS_OFFLINE |
Method Summary | |
void |
close()
Doesn't really close the connection, just puts it back in the pool. |
java.sql.Connection |
getConnection()
The real, delegate connection that we are using |
java.lang.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(java.lang.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(java.sql.Statement statement)
Notify that a statement has been closed and won't need closing when the connection is returned to the poo. |
void |
setRequester(java.lang.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. |
Methods inherited from interface org.logicalcobwebs.proxool.ConnectionInfoIF |
getAge, getBirthDate, getBirthTime, getDelegateHashcode, getDelegateUrl, getId, getMark, getProxyHashcode, getRequester, getStatus, getTimeLastStartActive, getTimeLastStopActive |
Methods inherited from interface java.lang.Comparable |
compareTo |
Method Detail |
public boolean 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 to
public boolean setStatus(int newStatus)
newStatus
- the status to change to
setStatus(int, int)
public void markForExpiry(java.lang.String reason)
reason
- why we are marking this connectionisMarkedForExpiry()
public boolean isMarkedForExpiry()
markForExpiry(java.lang.String)
public java.lang.String getReasonForMark()
public java.sql.Connection getConnection()
public boolean isNull()
public boolean isAvailable()
public boolean isActive()
public boolean isOffline()
public void reallyClose() throws java.sql.SQLException
java.sql.SQLException
public void setRequester(java.lang.String requester)
ConnectionInfoIF.getRequester()
public void close() throws java.sql.SQLException
java.sql.SQLException
Connection.close()
public void registerClosedStatement(java.sql.Statement statement)
statement
- the statement that has just been closedpublic boolean isReallyClosed() throws java.sql.SQLException
java.sql.SQLException
- if anything went wrong
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |