@ManagedObject(value="The connection pool") public class DuplexConnectionPool extends AbstractConnectionPool implements Sweeper.Sweepable
| Constructor and Description |
|---|
DuplexConnectionPool(Destination destination,
int maxConnections,
Callback requester) |
| Modifier and Type | Method and Description |
|---|---|
protected Connection |
activate() |
void |
close() |
protected boolean |
deactivate(Connection connection) |
void |
dump(Appendable out,
String indent) |
int |
getActiveConnectionCount() |
Collection<Connection> |
getActiveConnections() |
int |
getIdleConnectionCount() |
Queue<Connection> |
getIdleConnections() |
boolean |
isActive(Connection connection) |
protected void |
lock() |
protected void |
onCreated(Connection connection) |
boolean |
release(Connection connection) |
boolean |
remove(Connection connection) |
protected boolean |
remove(Connection connection,
boolean force) |
boolean |
sweep() |
String |
toString() |
protected void |
unlock() |
acquire, acquired, active, close, dump, getConnectionCount, getMaxConnectionCount, idle, isClosed, isEmpty, proceed, released, removedpublic DuplexConnectionPool(Destination destination, int maxConnections, Callback requester)
protected void lock()
protected void unlock()
@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 ConnectionPoolprotected void onCreated(Connection connection)
onCreated in class AbstractConnectionPoolprotected Connection activate()
activate in class AbstractConnectionPoolpublic boolean release(Connection connection)
release in interface ConnectionPoolprotected boolean deactivate(Connection connection)
public boolean remove(Connection connection)
remove in interface ConnectionPoolprotected boolean remove(Connection connection, boolean force)
public void close()
close in interface Closeableclose in interface AutoCloseableclose in interface ConnectionPoolclose in class AbstractConnectionPoolpublic void dump(Appendable out, String indent) throws IOException
dump in interface DumpableIOExceptionpublic boolean sweep()
sweep in interface Sweeper.SweepableCopyright © 1995–2017 Webtide. All rights reserved.