@ManagedObject public class RoundRobinConnectionPool extends AbstractConnectionPool
| Modifier and Type | Class and Description |
|---|---|
private static class |
RoundRobinConnectionPool.Entry |
ConnectionPool.Factory| Modifier and Type | Field and Description |
|---|---|
private java.util.List<RoundRobinConnectionPool.Entry> |
entries |
private int |
index |
| Constructor and Description |
|---|
RoundRobinConnectionPool(Destination destination,
int maxConnections,
Callback requester) |
| Modifier and Type | Method and Description |
|---|---|
protected Connection |
activate() |
void |
dump(java.lang.Appendable out,
java.lang.String indent) |
boolean |
isActive(Connection connection) |
protected void |
onCreated(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.
|
java.lang.String |
toString() |
acquire, acquired, active, close, close, dump, getConnectionCount, getMaxConnectionCount, getPendingCount, idle, isClosed, isEmpty, proceed, released, removed, tryCreateprivate final java.util.List<RoundRobinConnectionPool.Entry> entries
private int index
public RoundRobinConnectionPool(Destination destination, int maxConnections, Callback requester)
protected void onCreated(Connection connection)
onCreated in class AbstractConnectionPoolprotected Connection activate()
activate in class AbstractConnectionPoolpublic boolean isActive(Connection connection)
connection - the connection to testpublic boolean release(Connection connection)
ConnectionPoolReturns the given connection, previously obtained via ConnectionPool.acquire(),
back to this ConnectionPool.
connection - the connection to releasepublic boolean remove(Connection connection)
ConnectionPoolRemoves the given connection from this ConnectionPool.
connection - the connection to removepublic void dump(java.lang.Appendable out,
java.lang.String indent)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object