public abstract class AbstractXPooledConnection extends java.lang.Object implements XPooledConnection
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractXPooledConnection(ConnectionPoolProperties props) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeRecycledForCallingThread()
Can the connection be recycled (if not available) for the calling thread?
|
Reapable |
createConnectionProxy()
Create a disposable connection object that acts a controller for
the pooled connection.
|
protected abstract Reapable |
doCreateConnectionProxy() |
protected void |
fireOnXPooledConnectionTerminated() |
long |
getCreationTime()
Get the moment when the connection was created.
|
protected Reapable |
getCurrentConnectionProxy() |
protected int |
getDefaultIsolationLevel() |
long |
getLastTimeAcquired()
Get the last time the connection was acquired.
|
long |
getLastTimeReleased()
Get the last time the connection was released, i.e.
|
protected java.lang.String |
getTestQuery() |
boolean |
markAsBeingAcquiredIfAvailable()
Attempt to claim this connection for use.
|
void |
reap()
Invalidates (i.e., forces close) of the current connection proxy
This does not mean that the connection can be reused immediately:
pending transactions may exist that need to terminate.
|
void |
registerXPooledConnectionEventListener(XPooledConnectionEventListener listener) |
protected abstract void |
testUnderlyingConnection() |
void |
unregisterXPooledConnectionEventListener(XPooledConnectionEventListener listener) |
protected void |
updateLastTimeReleased() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, isAvailable, isErroneousprotected AbstractXPooledConnection(ConnectionPoolProperties props)
public long getLastTimeAcquired()
XPooledConnectiongetLastTimeAcquired in interface XPooledConnectionpublic long getLastTimeReleased()
XPooledConnectiongetLastTimeReleased in interface XPooledConnectionpublic Reapable createConnectionProxy() throws CreateConnectionException
XPooledConnectioncreateConnectionProxy in interface XPooledConnectionCreateConnectionExceptionpublic void reap()
XPooledConnectionreap in interface XPooledConnectionpublic void registerXPooledConnectionEventListener(XPooledConnectionEventListener listener)
registerXPooledConnectionEventListener in interface XPooledConnectionpublic void unregisterXPooledConnectionEventListener(XPooledConnectionEventListener listener)
unregisterXPooledConnectionEventListener in interface XPooledConnectionprotected void fireOnXPooledConnectionTerminated()
protected java.lang.String getTestQuery()
protected void updateLastTimeReleased()
protected Reapable getCurrentConnectionProxy()
public boolean canBeRecycledForCallingThread()
XPooledConnectioncanBeRecycledForCallingThread in interface XPooledConnectionprotected int getDefaultIsolationLevel()
public long getCreationTime()
XPooledConnectiongetCreationTime in interface XPooledConnectionpublic boolean markAsBeingAcquiredIfAvailable()
XPooledConnectionmarkAsBeingAcquiredIfAvailable in interface XPooledConnectionprotected abstract Reapable doCreateConnectionProxy() throws CreateConnectionException
CreateConnectionExceptionprotected abstract void testUnderlyingConnection()
throws CreateConnectionException
CreateConnectionExceptionCopyright © 2018. All Rights Reserved.