Package org.eclipse.jetty.client
Class AbstractConnectionPool
- java.lang.Object
-
- org.eclipse.jetty.client.AbstractConnectionPool
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,ConnectionPool,Dumpable
- Direct Known Subclasses:
DuplexConnectionPool,MultiplexConnectionPool,RoundRobinConnectionPool
@ManagedObject public abstract class AbstractConnectionPool extends java.lang.Object implements ConnectionPool, Dumpable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.client.ConnectionPool
ConnectionPool.Factory, ConnectionPool.Multiplexable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Connectionacquire()Returns an idle connection, if available, or schedules the opening of a new connection and returnsnull.voidclose()Closes this ConnectionPool.java.lang.Stringdump()intgetConnectionCount()intgetMaxConnectionCount()intgetPendingConnectionCount()intgetPendingCount()Deprecated.usegetPendingConnectionCount()insteadbooleanisClosed()booleanisEmpty()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.client.ConnectionPool
isActive, release, remove
-
-
-
-
Method Detail
-
getMaxConnectionCount
@ManagedAttribute(value="The max number of connections", readonly=true) public int getMaxConnectionCount()
-
getConnectionCount
@ManagedAttribute(value="The number of connections", readonly=true) public int getConnectionCount()
-
getPendingCount
@ManagedAttribute(value="The number of pending connections", readonly=true) @Deprecated public int getPendingCount()
Deprecated.usegetPendingConnectionCount()instead- Returns:
- the number of pending connections
-
getPendingConnectionCount
@ManagedAttribute(value="The number of pending connections", readonly=true) public int getPendingConnectionCount()
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceConnectionPool- Returns:
- whether this ConnectionPool has no open connections
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfaceConnectionPool- Returns:
- whether this ConnectionPool has been closed
- See Also:
ConnectionPool.close()
-
acquire
public Connection acquire()
Description copied from interface:ConnectionPoolReturns an idle connection, if available, or schedules the opening of a new connection and returns
null.- Specified by:
acquirein interfaceConnectionPool- Returns:
- an available connection, or null
-
close
public void close()
Description copied from interface:ConnectionPoolCloses this ConnectionPool.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceConnectionPool- See Also:
ConnectionPool.isClosed()
-
-