public class ArrayBlockingQueueManagedConnectionPool extends java.lang.Object implements ManagedConnectionPool
Constructor and Description |
---|
ArrayBlockingQueueManagedConnectionPool()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
fillToMin()
Fill to min
|
void |
flush()
Flush idle connections
|
void |
flush(boolean kill)
Flush
|
ConnectionListener |
getConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
Returns a connection listener that wraps managed connection.
|
ManagedConnectionPoolStatistics |
getStatistics()
Get statistics
|
void |
initialize(javax.resource.spi.ManagedConnectionFactory mcf,
ConnectionListenerFactory clf,
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 |
isRunning()
Checks if the pool is running or not
|
void |
reenable()
Reenable a pool
|
void |
removeIdleConnections()
Pool removes idle connections.
|
void |
returnConnection(ConnectionListener cl,
boolean kill)
Return connection to the pool.
|
void |
shutdown()
Shutdown
|
java.lang.String |
toString()
String representation
|
void |
validateConnections()
Validate connecitons.
|
public ArrayBlockingQueueManagedConnectionPool()
public void initialize(javax.resource.spi.ManagedConnectionFactory mcf, ConnectionListenerFactory clf, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri, PoolConfiguration pc, Pool p)
initialize
in interface ManagedConnectionPool
mcf
- The managed connection factoryclf
- The connection listener factorysubject
- The subjectcri
- The connection request infopc
- The pool configurationp
- The poolpublic boolean isRunning()
isRunning
in interface ManagedConnectionPool
public boolean isEmpty()
isEmpty
in interface ManagedConnectionPool
public void reenable()
reenable
in interface ManagedConnectionPool
public ConnectionListener getConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
getConnection
in interface ManagedConnectionPool
subject
- subjectcri
- connection request infojavax.resource.ResourceException
- exceptionpublic void returnConnection(ConnectionListener cl, boolean kill)
returnConnection
in interface ManagedConnectionPool
cl
- connection listenerkill
- kill connectionpublic void flush()
flush
in interface ManagedConnectionPool
public void flush(boolean kill)
flush
in interface ManagedConnectionPool
kill
- Kill all connectionspublic void removeIdleConnections()
removeIdleConnections
in interface IdleConnectionRemovalSupport
public void shutdown()
shutdown
in interface ManagedConnectionPool
public void fillToMin()
fillToMin
in interface ManagedConnectionPool
public ManagedConnectionPoolStatistics getStatistics()
getStatistics
in interface ManagedConnectionPool
public void validateConnections() throws java.lang.Exception
validateConnections
in interface ManagedConnectionPool
java.lang.Exception
- for exceptionpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright ? 2008-2009 Red Hat Middleware LLC (http://www.jboss.com/)