public abstract class AbstractConnectionPool extends Object implements ConnectionPool, Dumpable
Modifier | Constructor and Description |
---|---|
protected |
AbstractConnectionPool(Destination destination,
int maxConnections,
Callback requester) |
Modifier and Type | Method and Description |
---|---|
Connection |
acquire() |
protected void |
acquired(Connection connection) |
protected abstract Connection |
activate() |
protected Connection |
active(Connection connection) |
void |
close() |
protected void |
close(Collection<Connection> connections) |
String |
dump() |
int |
getConnectionCount() |
int |
getMaxConnectionCount() |
protected boolean |
idle(Connection connection,
boolean close) |
boolean |
isClosed() |
boolean |
isEmpty() |
protected abstract void |
onCreated(Connection connection) |
protected void |
proceed() |
protected void |
released(Connection connection) |
protected void |
removed(Connection connection) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isActive, release, remove
protected AbstractConnectionPool(Destination destination, int maxConnections, Callback requester)
@ManagedAttribute(value="The max number of connections", readonly=true) public int getMaxConnectionCount()
@ManagedAttribute(value="The number of connections", readonly=true) public int getConnectionCount()
public boolean isEmpty()
isEmpty
in interface ConnectionPool
public boolean isClosed()
isClosed
in interface ConnectionPool
public Connection acquire()
acquire
in interface ConnectionPool
protected abstract void onCreated(Connection connection)
protected void proceed()
protected abstract Connection activate()
protected Connection active(Connection connection)
protected void acquired(Connection connection)
protected boolean idle(Connection connection, boolean close)
protected void released(Connection connection)
protected void removed(Connection connection)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface ConnectionPool
protected void close(Collection<Connection> connections)
Copyright © 1995–2017 Webtide. All rights reserved.