public interface ManagedConnectionPool extends IdleConnectionRemovalSupport
Modifier and Type | Method and Description |
---|---|
void |
addConnectionListener(ConnectionListener cl)
Add a connection to the pool
|
void |
fillTo(int size)
Fill to
|
ConnectionListener |
findConnectionListener(javax.resource.spi.ManagedConnection mc)
Find a connection listener
|
ConnectionListener |
findConnectionListener(javax.resource.spi.ManagedConnection mc,
java.lang.Object connection)
Find a connection listener
|
void |
flush(FlushMode mode)
Flush
|
int |
getActive()
Get number of active connections
|
ConnectionListener |
getConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
Returns a connection listener that wraps managed connection.
|
long |
getLastUsed()
Get the last used timestamp
|
ManagedConnectionPoolStatistics |
getStatistics()
Get statistics
|
void |
increaseCapacity(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
Increase capacity
|
void |
initialize(javax.resource.spi.ManagedConnectionFactory mcf,
ConnectionManager cm,
javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo cri,
PoolConfiguration pc,
Pool p)
Initialize the managed connection pool
|
boolean |
isEmpty()
Checks if the pool is empty or not
|
boolean |
isFull()
Is the pool full ?
|
boolean |
isIdle()
Is the pool idle ?
|
boolean |
isRunning()
Checks if the pool is running or not
|
void |
prefill()
Prefill
|
void |
reenable()
Reenable a pool
|
ConnectionListener |
removeConnectionListener()
Remove an idle connection from the pool
|
void |
returnConnection(ConnectionListener cl,
boolean kill)
Return connection to the pool.
|
void |
shutdown()
Shutdown
|
void |
validateConnections()
Validate connecitons.
|
removeIdleConnections
long getLastUsed()
void initialize(javax.resource.spi.ManagedConnectionFactory mcf, ConnectionManager cm, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri, PoolConfiguration pc, Pool p)
mcf
- The managed connection factorycm
- The connection managersubject
- The subjectcri
- The connection request infopc
- The pool configurationp
- The poolConnectionListener getConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
subject
- subjectcri
- connection request infojavax.resource.ResourceException
- exceptionConnectionListener findConnectionListener(javax.resource.spi.ManagedConnection mc)
mc
- The managed connectionnull
if the connection listener doesn't belongConnectionListener findConnectionListener(javax.resource.spi.ManagedConnection mc, java.lang.Object connection)
mc
- The managed connectionconnection
- The connectionnull
if the connection listener doesn't belongvoid returnConnection(ConnectionListener cl, boolean kill)
cl
- connection listenerkill
- kill connectionboolean isEmpty()
boolean isFull()
boolean isIdle()
boolean isRunning()
int getActive()
void reenable()
void prefill()
void flush(FlushMode mode)
mode
- The flush modevoid shutdown()
void fillTo(int size)
size
- The sizevoid validateConnections() throws java.lang.Exception
java.lang.Exception
- for exceptionManagedConnectionPoolStatistics getStatistics()
void increaseCapacity(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
subject
- The subjectcri
- The connection request information objectvoid addConnectionListener(ConnectionListener cl)
cl
- The connection listenerConnectionListener removeConnectionListener()
null
if no connection listener was availableCopyright © 2013 IronJacamar (http://www.ironjacamar.org)