
public class ArrayBlockingQueueManagedConnectionPool extends Object implements ManagedConnectionPool
| Constructor and Description |
|---|
ArrayBlockingQueueManagedConnectionPool()
Constructor
|
| 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,
Object connection)
Find a connection listener
|
void |
flush(org.jboss.jca.core.api.connectionmanager.pool.FlushMode mode)
Flush
|
int |
getActive()
Get number of active connections
|
ConnectionListener |
getConnection(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(Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
Increase capacity
|
void |
initialize(javax.resource.spi.ManagedConnectionFactory mcf,
ConnectionManager cm,
Subject subject,
javax.resource.spi.ConnectionRequestInfo cri,
org.jboss.jca.core.api.connectionmanager.pool.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 |
removeIdleConnections()
Pool removes idle connections.
|
void |
returnConnection(ConnectionListener cl,
boolean kill)
Return connection to the pool.
|
void |
returnConnection(ConnectionListener cl,
boolean kill,
boolean cleanup)
Return a connection to the pool
|
void |
shutdown()
Shutdown
|
String |
toString()
String representation
|
void |
validateConnections()
Validate connecitons.
|
public ArrayBlockingQueueManagedConnectionPool()
public void initialize(javax.resource.spi.ManagedConnectionFactory mcf,
ConnectionManager cm,
Subject subject,
javax.resource.spi.ConnectionRequestInfo cri,
org.jboss.jca.core.api.connectionmanager.pool.PoolConfiguration pc,
Pool p)
initialize in interface ManagedConnectionPoolmcf - The managed connection factorycm - The connection managersubject - The subjectcri - The connection request infopc - The pool configurationp - The poolpublic long getLastUsed()
getLastUsed in interface ManagedConnectionPoolpublic boolean isRunning()
isRunning in interface ManagedConnectionPoolpublic boolean isEmpty()
isEmpty in interface ManagedConnectionPoolpublic boolean isFull()
isFull in interface ManagedConnectionPoolpublic boolean isIdle()
isIdle in interface ManagedConnectionPoolpublic int getActive()
getActive in interface ManagedConnectionPoolpublic void reenable()
reenable in interface ManagedConnectionPoolpublic void prefill()
prefill in interface ManagedConnectionPoolpublic ConnectionListener getConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
getConnection in interface ManagedConnectionPoolsubject - subjectcri - connection request infojavax.resource.ResourceException - exceptionpublic ConnectionListener findConnectionListener(javax.resource.spi.ManagedConnection mc)
findConnectionListener in interface ManagedConnectionPoolmc - The managed connectionnull if the connection listener doesn't belongpublic ConnectionListener findConnectionListener(javax.resource.spi.ManagedConnection mc, Object connection)
findConnectionListener in interface ManagedConnectionPoolmc - The managed connectionconnection - The connectionnull if the connection listener doesn't belongpublic void addConnectionListener(ConnectionListener cl)
addConnectionListener in interface ManagedConnectionPoolcl - The connection listenerpublic ConnectionListener removeConnectionListener()
removeConnectionListener in interface ManagedConnectionPoolnull if no connection listener was availablepublic void returnConnection(ConnectionListener cl, boolean kill)
returnConnection in interface ManagedConnectionPoolcl - connection listenerkill - kill connectionpublic void returnConnection(ConnectionListener cl, boolean kill, boolean cleanup)
cl - The connection listenerkill - Should the connection be killedcleanup - Should cleanup be performedpublic void flush(org.jboss.jca.core.api.connectionmanager.pool.FlushMode mode)
flush in interface ManagedConnectionPoolmode - The flush modepublic void removeIdleConnections()
removeIdleConnections in interface IdleConnectionRemovalSupportpublic void shutdown()
shutdown in interface ManagedConnectionPoolpublic void fillTo(int size)
fillTo in interface ManagedConnectionPoolsize - The sizepublic ManagedConnectionPoolStatistics getStatistics()
getStatistics in interface ManagedConnectionPoolpublic void increaseCapacity(Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
increaseCapacity in interface ManagedConnectionPoolsubject - The subjectcri - The connection request information objectpublic void validateConnections()
throws Exception
validateConnections in interface ManagedConnectionPoolException - for exceptionCopyright © 2013 IronJacamar (http://www.ironjacamar.org)