java.io.Closeable, java.lang.AutoCloseable, ConnectionPool, org.eclipse.jetty.util.thread.Sweeper.SweepableLeakTrackingConnectionPool, ValidatingConnectionPool@ManagedObject public class DuplexConnectionPool extends AbstractConnectionPool implements org.eclipse.jetty.util.thread.Sweeper.Sweepable
ConnectionPool.Factory, ConnectionPool.Multiplexable| Constructor | Description |
|---|---|
DuplexConnectionPool(Destination destination,
int maxConnections,
org.eclipse.jetty.util.Callback requester) |
| Modifier and Type | Method | Description |
|---|---|---|
protected Connection |
activate() |
|
void |
close() |
Closes this ConnectionPool.
|
protected boolean |
deactivate(Connection connection) |
|
void |
dump(java.lang.Appendable out,
java.lang.String indent) |
|
int |
getActiveConnectionCount() |
|
java.util.Collection<Connection> |
getActiveConnections() |
|
int |
getIdleConnectionCount() |
|
java.util.Queue<Connection> |
getIdleConnections() |
|
boolean |
isActive(Connection connection) |
|
protected void |
lock() |
|
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.
|
protected boolean |
remove(Connection connection,
boolean force) |
|
boolean |
sweep() |
|
java.lang.String |
toString() |
|
protected void |
unlock() |
acquire, acquired, active, close, dump, getConnectionCount, getMaxConnectionCount, getPendingCount, idle, isClosed, isEmpty, proceed, released, removed, tryCreatepublic DuplexConnectionPool(Destination destination, int maxConnections, org.eclipse.jetty.util.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 java.util.Queue<Connection> getIdleConnections()
public java.util.Collection<Connection> getActiveConnections()
public boolean isActive(Connection connection)
isActive in interface ConnectionPoolconnection - the connection to testprotected void onCreated(Connection connection)
onCreated in class AbstractConnectionPoolprotected Connection activate()
activate in class AbstractConnectionPoolpublic boolean release(Connection connection)
ConnectionPoolReturns the given connection, previously obtained via ConnectionPool.acquire(),
back to this ConnectionPool.
release in interface ConnectionPoolconnection - the connection to releaseprotected boolean deactivate(Connection connection)
public boolean remove(Connection connection)
ConnectionPoolRemoves the given connection from this ConnectionPool.
remove in interface ConnectionPoolconnection - the connection to removeprotected boolean remove(Connection connection, boolean force)
public void close()
ConnectionPoolclose in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in interface ConnectionPoolclose in class AbstractConnectionPoolConnectionPool.isClosed()public void dump(java.lang.Appendable out,
java.lang.String indent)
throws java.io.IOException
java.io.IOExceptionpublic boolean sweep()
sweep in interface org.eclipse.jetty.util.thread.Sweeper.Sweepablepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 1995–2018 Webtide. All rights reserved.