public class ConnectionPool extends Object implements Closeable, Dumpable
Constructor and Description |
---|
ConnectionPool(Destination destination,
int maxConnections,
Promise<Connection> connectionPromise) |
Modifier and Type | Method and Description |
---|---|
Connection |
acquire() |
protected void |
acquired(Connection connection) |
void |
close() |
String |
dump() |
void |
dump(Appendable out,
String indent) |
BlockingQueue<Connection> |
getActiveConnections() |
BlockingQueue<Connection> |
getIdleConnections() |
boolean |
isActive(Connection connection) |
boolean |
isEmpty() |
boolean |
isIdle(Connection connection) |
boolean |
release(Connection connection) |
protected void |
released(Connection connection) |
boolean |
remove(Connection connection) |
String |
toString() |
protected static final Logger LOG
public ConnectionPool(Destination destination, int maxConnections, Promise<Connection> connectionPromise)
public BlockingQueue<Connection> getIdleConnections()
public BlockingQueue<Connection> getActiveConnections()
public Connection acquire()
protected void acquired(Connection connection)
public boolean release(Connection connection)
protected void released(Connection connection)
public boolean remove(Connection connection)
public boolean isActive(Connection connection)
public boolean isIdle(Connection connection)
public boolean isEmpty()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void dump(Appendable out, String indent) throws IOException
dump
in interface Dumpable
IOException
Copyright © 1995-2015 Webtide. All Rights Reserved.