@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, removed
public 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 ConnectionPool
protected void onCreated(Connection connection)
onCreated
in class AbstractConnectionPool
protected Connection activate()
activate
in class AbstractConnectionPool
public boolean release(Connection connection)
release
in interface ConnectionPool
protected boolean deactivate(Connection connection)
public boolean remove(Connection connection)
remove
in interface ConnectionPool
protected boolean remove(Connection connection, boolean force)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface ConnectionPool
close
in class AbstractConnectionPool
public void dump(Appendable out, String indent) throws IOException
dump
in interface Dumpable
IOException
public boolean sweep()
sweep
in interface Sweeper.Sweepable
Copyright © 1995–2017 Webtide. All rights reserved.