@ManagedObject public class DuplexConnectionPool extends AbstractConnectionPool implements Sweeper.Sweepable
ConnectionPool.Factory, ConnectionPool.Multiplexable| Constructor and Description |
|---|
DuplexConnectionPool(Destination destination,
int maxConnections,
Callback requester) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this ConnectionPool.
|
void |
dump(Appendable out,
String indent)
Dump this object (and children) into an Appendable using the provided indent after any new lines.
|
int |
getActiveConnectionCount() |
Collection<Connection> |
getActiveConnections() |
int |
getIdleConnectionCount() |
Queue<Connection> |
getIdleConnections() |
boolean |
isActive(Connection connection) |
boolean |
release(Connection connection)
Returns the given connection, previously obtained via
ConnectionPool.acquire(),
back to this ConnectionPool. |
boolean |
remove(Connection connection)
Removes the given connection from this ConnectionPool.
|
boolean |
sweep() |
String |
toString() |
acquire, dump, getConnectionCount, getMaxConnectionCount, getPendingConnectionCount, getPendingCount, isClosed, isEmptyequals, getClass, hashCode, notify, notifyAll, wait, wait, waitdump, dumpContainer, dumpIterable, dumpMapEntries, dumpObject, dumpObjects, dumpSelf, namedpublic DuplexConnectionPool(Destination destination, int maxConnections, Callback requester)
@ManagedAttribute(value="The number of idle connections", readonly=true) public int getIdleConnectionCount()
@ManagedAttribute(value="The number of active connections", readonly=true) public int getActiveConnectionCount()
public Queue<Connection> getIdleConnections()
public Collection<Connection> getActiveConnections()
public boolean isActive(Connection connection)
isActive in interface ConnectionPoolconnection - the connection to testpublic boolean release(Connection connection)
ConnectionPoolReturns the given connection, previously obtained via ConnectionPool.acquire(),
back to this ConnectionPool.
release in interface ConnectionPoolconnection - the connection to releasepublic boolean remove(Connection connection)
ConnectionPoolRemoves the given connection from this ConnectionPool.
remove in interface ConnectionPoolconnection - the connection to removepublic void close()
ConnectionPoolclose in interface Closeableclose in interface AutoCloseableclose in interface ConnectionPoolclose in class AbstractConnectionPoolConnectionPool.isClosed()public void dump(Appendable out, String indent) throws IOException
Dumpabledump in interface Dumpableout - The appendable to dump toindent - The indent to apply after any new lines.IOException - if unable to write to Appendablepublic boolean sweep()
sweep in interface Sweeper.SweepableCopyright © 2010 - 2020 Adobe. All Rights Reserved