
public class SemaphoreConcurrentLinkedDequeManagedConnectionPool extends java.lang.Object implements ManagedConnectionPool
| Constructor and Description |
|---|
SemaphoreConcurrentLinkedDequeManagedConnectionPool()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionListener(ConnectionListener cl)
Add a connection to the pool
|
void |
connectionListenerDestroyed(ConnectionListener cl)
Notify that a connection listener belonging to this pool was destroyed.
|
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(org.jboss.jca.core.api.connectionmanager.pool.FlushMode mode,
java.util.Collection<ConnectionListener> toDestroy)
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
|
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,
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 |
isIdle()
Is the pool idle ?
|
boolean |
isRunning()
Checks if the pool is running or not
|
void |
prefill()
Prefill
|
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) |
void |
shutdown()
Shutdown
|
java.lang.String |
toString()
String representation
|
void |
validateConnections()
Validate connecitons.
|
public SemaphoreConcurrentLinkedDequeManagedConnectionPool()
public void initialize(javax.resource.spi.ManagedConnectionFactory mcf,
ConnectionManager cm,
javax.security.auth.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 isIdle()
isIdle in interface ManagedConnectionPoolpublic int getActive()
getActive in interface ManagedConnectionPoolpublic void prefill()
prefill in interface ManagedConnectionPoolpublic ConnectionListener getConnection(javax.security.auth.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, java.lang.Object connection)
findConnectionListener in interface ManagedConnectionPoolmc - The managed connectionconnection - The connectionnull if the connection listener doesn't belongpublic void returnConnection(ConnectionListener cl, boolean kill)
returnConnection in interface ManagedConnectionPoolcl - connection listenerkill - kill connectionpublic void returnConnection(ConnectionListener cl, boolean kill, boolean cleanup)
public void flush(org.jboss.jca.core.api.connectionmanager.pool.FlushMode mode,
java.util.Collection<ConnectionListener> toDestroy)
flush in interface ManagedConnectionPoolmode - The flush modetoDestroy - list of connection listeners to be destroyedpublic void removeIdleConnections()
removeIdleConnections in interface IdleConnectionRemovalSupportpublic void shutdown()
shutdown in interface ManagedConnectionPoolpublic void fillTo(int size)
fillTo in interface ManagedConnectionPoolsize - The sizepublic void increaseCapacity(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
ManagedConnectionPoolincreaseCapacity in interface ManagedConnectionPoolsubject - The subjectcri - The connection request information objectpublic void addConnectionListener(ConnectionListener cl)
addConnectionListener in interface ManagedConnectionPoolcl - The connection listenerpublic ConnectionListener removeConnectionListener()
removeConnectionListener in interface ManagedConnectionPoolnull if no connection listener was availablepublic void connectionListenerDestroyed(ConnectionListener cl)
connectionListenerDestroyed in interface ManagedConnectionPoolpublic void validateConnections()
throws java.lang.Exception
validateConnections in interface ManagedConnectionPooljava.lang.Exception - for exceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2014 IronJacamar (http://www.ironjacamar.org)