java.io.Closeable, java.lang.AutoCloseable, ConnectionPool, org.eclipse.jetty.util.component.DumpableDuplexConnectionPool, MultiplexConnectionPool, RoundRobinConnectionPool@ManagedObject public abstract class AbstractConnectionPool extends java.lang.Object implements ConnectionPool, org.eclipse.jetty.util.component.Dumpable
ConnectionPool.Factory, ConnectionPool.Multiplexable| Modifier | Constructor | Description |
|---|---|---|
protected |
AbstractConnectionPool(Destination destination,
int maxConnections,
org.eclipse.jetty.util.Callback requester) |
| Modifier and Type | Method | Description |
|---|---|---|
Connection |
acquire() |
Returns an idle connection, if available, or schedules the opening
of a new connection and returns
null. |
protected void |
acquired(Connection connection) |
|
protected abstract Connection |
activate() |
|
protected Connection |
active(Connection connection) |
|
void |
close() |
Closes this ConnectionPool.
|
protected void |
close(java.util.Collection<Connection> connections) |
|
java.lang.String |
dump() |
|
int |
getConnectionCount() |
|
int |
getMaxConnectionCount() |
|
int |
getPendingCount() |
|
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) |
|
protected void |
tryCreate(int maxPending) |
isActive, release, removeprotected AbstractConnectionPool(Destination destination, int maxConnections, org.eclipse.jetty.util.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()
@ManagedAttribute(value="The number of pending connections",
readonly=true)
public int getPendingCount()
public boolean isEmpty()
isEmpty in interface ConnectionPoolpublic boolean isClosed()
isClosed in interface ConnectionPoolConnectionPool.close()public Connection acquire()
ConnectionPoolReturns an idle connection, if available, or schedules the opening
of a new connection and returns null.
acquire in interface ConnectionPoolprotected void tryCreate(int maxPending)
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()
ConnectionPoolclose in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in interface ConnectionPoolConnectionPool.isClosed()protected void close(java.util.Collection<Connection> connections)
public java.lang.String dump()
dump in interface org.eclipse.jetty.util.component.DumpableCopyright © 1995–2018 Webtide. All rights reserved.