public abstract class AbstractXPooledConnection<ConnectionType> extends Object implements XPooledConnection<ConnectionType>
| 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?
|
ConnectionType |
createConnectionProxy()
Create a disposable connection object that acts a controller for
the pooled connection.
|
void |
destroy(boolean reap)
Destroy the pooled connection by closing the underlying physical connection.
|
protected abstract ConnectionType |
doCreateConnectionProxy() |
protected abstract void |
doDestroy(boolean reap) |
protected void |
fireOnXPooledConnectionTerminated() |
protected int |
getBorrowConnectionTimeout() |
long |
getCreationTime()
Get the moment when the connection was created.
|
protected ConnectionType |
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 String |
getTestQuery() |
boolean |
markAsBeingAcquiredIfAvailable()
Attempt to claim this connection for use.
|
protected boolean |
maxLifetimeExceeded() |
protected void |
processStackTrace() |
void |
registerXPooledConnectionEventListener(XPooledConnectionEventListener<ConnectionType> listener) |
protected abstract void |
testUnderlyingConnection() |
void |
unregisterXPooledConnectionEventListener(XPooledConnectionEventListener<ConnectionType> listener) |
protected void |
updateLastTimeReleased() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisAvailable, isErroneousprotected AbstractXPooledConnection(ConnectionPoolProperties props)
protected void processStackTrace()
public long getLastTimeAcquired()
XPooledConnectiongetLastTimeAcquired in interface XPooledConnection<ConnectionType>public long getLastTimeReleased()
XPooledConnectiongetLastTimeReleased in interface XPooledConnection<ConnectionType>public ConnectionType createConnectionProxy() throws CreateConnectionException
XPooledConnectioncreateConnectionProxy in interface XPooledConnection<ConnectionType>CreateConnectionExceptionpublic void registerXPooledConnectionEventListener(XPooledConnectionEventListener<ConnectionType> listener)
registerXPooledConnectionEventListener in interface XPooledConnection<ConnectionType>public void unregisterXPooledConnectionEventListener(XPooledConnectionEventListener<ConnectionType> listener)
unregisterXPooledConnectionEventListener in interface XPooledConnection<ConnectionType>protected void fireOnXPooledConnectionTerminated()
protected String getTestQuery()
protected void updateLastTimeReleased()
protected ConnectionType getCurrentConnectionProxy()
public boolean canBeRecycledForCallingThread()
XPooledConnectioncanBeRecycledForCallingThread in interface XPooledConnection<ConnectionType>protected int getDefaultIsolationLevel()
protected int getBorrowConnectionTimeout()
public long getCreationTime()
XPooledConnectiongetCreationTime in interface XPooledConnection<ConnectionType>public boolean markAsBeingAcquiredIfAvailable()
XPooledConnectionmarkAsBeingAcquiredIfAvailable in interface XPooledConnection<ConnectionType>protected abstract ConnectionType doCreateConnectionProxy() throws CreateConnectionException
CreateConnectionExceptionprotected abstract void testUnderlyingConnection()
throws CreateConnectionException
CreateConnectionExceptionprotected boolean maxLifetimeExceeded()
public void destroy(boolean reap)
XPooledConnectiondestroy in interface XPooledConnection<ConnectionType>protected abstract void doDestroy(boolean reap)
Copyright © 2022. All rights reserved.