| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpDestination | |
| private volatile int | |
| private static final Logger | |
| private volatile long | |
| private boolean | |
| private volatile int | |
| private final AtomicInteger | |
| private Pool | |
| private final Pool. |
| Access | Constructor and Description |
|---|---|
| protected | AbstractConnectionPool(Destination destination, Pool.
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | accept(Connection
the connection to accept connection)Implements org. Accepts the given connection to be managed by this ConnectionPool. |
| public Connection | Returns: an idle connection ornull if no idle connections are availablea hint to attempt to open a new connection if no idle connections are available create)Implements org. Returns an idle connection, if available;
if an idle connection is not available, and the given |
| protected void | |
| protected Connection | |
| private void | |
| protected boolean | |
| protected void | doStart()
Overrides org. Starts the managed lifecycle beans in the order they were added. |
| protected void | doStop()
Overrides org. Stops the managed lifecycle beans in the reverse order they were added. |
| public void | dump(Appendable
The appendable to dump to out, String The indent to apply after any new lines. indent)Overrides org. Implements org. Dump this object (and children) into an Appendable using the provided indent after any new lines. |
| public int | |
| pack-priv Collection | |
| public int | |
| public int | |
| pack-priv Collection | |
| protected int | |
| public int | |
| public long | Returns: the max usage duration, in milliseconds, of a pooled connectionReturns the max usage duration in milliseconds of a pooled connection. |
| public int | Returns: the max number of times a pooled connection can be usedReturns the max number of times a pooled connection can be used. |
| public int | |
| protected boolean | |
| public boolean | isActive(Connection
the connection to test connection)Implements org.
|
| public boolean | |
| public boolean | |
| protected void | |
| public CompletableFuture | preCreateConnections(int
the number of connections to pre-start. connectionCount)Overrides default org. Optionally pre-create up to |
| protected void | |
| public boolean | release(Connection
the connection to release connection)Implements org. Returns the given connection, previously obtained via |
| protected void | |
| public boolean | remove(Connection
the connection to remove connection)Implements org. Removes the given connection from this ConnectionPool. |
| protected void | |
| protected void | |
| public void | |
| public void | setMaximizeConnections(boolean
whether the number of connections should be maximized maximizeConnections)Sets whether the number of connections should be maximized. |
| public void | |
| public boolean | |
| public String | toString()
Overrides org. Returns a string representation of the object. |
| protected void |
| destination | back to summary |
|---|---|
| private final HttpDestination destination | |
| initialMaxMultiplex | back to summary |
|---|---|
| private volatile int initialMaxMultiplex | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG Hides org. | |
| maxDurationNanos | back to summary |
|---|---|
| private volatile long maxDurationNanos | |
| maximizeConnections | back to summary |
|---|---|
| private boolean maximizeConnections | |
| maxUsage | back to summary |
|---|---|
| private volatile int maxUsage | |
| pending | back to summary |
|---|---|
| private final AtomicInteger pending | |
| pool | back to summary |
|---|---|
| private Pool<Connection> pool | |
| poolFactory | back to summary |
|---|---|
| private final Pool. | |
| AbstractConnectionPool | back to summary |
|---|---|
| protected AbstractConnectionPool(Destination destination, Pool. | |
| accept | back to summary |
|---|---|
| public boolean accept(Connection connection) Implements org. Doc from org. Accepts the given connection to be managed by this ConnectionPool.
| |
| acquire | back to summary |
|---|---|
| public Connection acquire(boolean create) Implements org. Returns an idle connection, if available;
if an idle connection is not available, and the given The
| |
| acquired | back to summary |
|---|---|
| protected void acquired(Connection connection) | |
| activate | back to summary |
|---|---|
| protected Connection activate() | |
| close | back to summary |
|---|---|
| private void close(Pool. | |
| deactivate | back to summary |
|---|---|
| protected boolean deactivate(Connection connection) | |
| doStart | back to summary |
|---|---|
| protected void doStart() throws Exception Overrides org. Doc from org. Starts the managed lifecycle beans in the order they were added.
| |
| doStop | back to summary |
|---|---|
| protected void doStop() throws Exception Overrides org. Doc from org. Stops the managed lifecycle beans in the reverse order they were added.
| |
| dump | back to summary |
|---|---|
| public void dump(Appendable out, String indent) throws IOException Overrides org. Implements org. Doc from org. Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.
| |
| getActiveConnectionCount | back to summary |
|---|---|
public int getActiveConnectionCount()
| |
| getActiveConnections | back to summary |
|---|---|
| pack-priv Collection | |
| getConnectionCount | back to summary |
|---|---|
public int getConnectionCount()
| |
| getIdleConnectionCount | back to summary |
|---|---|
public int getIdleConnectionCount()
| |
| getIdleConnections | back to summary |
|---|---|
| pack-priv Collection | |
| getInitialMaxMultiplex | back to summary |
|---|---|
| protected int getInitialMaxMultiplex() | |
| getMaxConnectionCount | back to summary |
|---|---|
public int getMaxConnectionCount()
| |
| getMaxDuration | back to summary |
|---|---|
| public long getMaxDuration() Returns the max usage duration in milliseconds of a pooled connection. Values This property only guarantees that a connection cannot be acquired
after the configured duration elapses, so that is only enforced when
If a pool stays completely idle for a duration longer than the value
returned by this method, the max duration will not be enforced.
It's up to the idle timeout mechanism (see
| |
| getMaxUsage | back to summary |
|---|---|
| public int getMaxUsage() Returns the max number of times a pooled connection can be used. Values
| |
| getPendingConnectionCount | back to summary |
|---|---|
public int getPendingConnectionCount()
| |
| idle | back to summary |
|---|---|
| protected boolean idle(Connection connection, boolean close) | |
| isActive | back to summary |
|---|---|
| public boolean isActive(Connection connection) Implements org.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements org.
| |
| isMaximizeConnections | back to summary |
|---|---|
public boolean isMaximizeConnections()
| |
| onCreated | back to summary |
|---|---|
| protected void onCreated(Connection connection) | |
| preCreateConnections | back to summary |
|---|---|
| public CompletableFuture Overrides default org. Doc from org. Optionally pre-create up to
| |
| proceed | back to summary |
|---|---|
| protected void proceed() | |
| release | back to summary |
|---|---|
| public boolean release(Connection connection) Implements org. Doc from org. Returns the given connection, previously obtained via
| |
| released | back to summary |
|---|---|
| protected void released(Connection connection) | |
| remove | back to summary |
|---|---|
| public boolean remove(Connection connection) Implements org. Doc from org. Removes the given connection from this ConnectionPool.
| |
| removed | back to summary |
|---|---|
| protected void removed(Connection connection) | |
| setInitialMaxMultiplex | back to summary |
|---|---|
| protected void setInitialMaxMultiplex(int initialMaxMultiplex) | |
| setMaxDuration | back to summary |
|---|---|
| public void setMaxDuration(long maxDurationInMs) | |
| setMaximizeConnections | back to summary |
|---|---|
| public void setMaximizeConnections(boolean maximizeConnections) Sets whether the number of connections should be maximized.
| |
| setMaxUsage | back to summary |
|---|---|
| public void setMaxUsage(int maxUsage) | |
| sweep | back to summary |
|---|---|
| public boolean sweep() Implements org.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| tryCreate | back to summary |
|---|---|
| protected void tryCreate(boolean create) Tries to create a new connection. Whether a new connection is created is determined by the Since the number of queued requests used to derive the demand may be a stale value, it is possible that few more connections than strictly necessary may be created, but enough to satisfy the demand.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final Pool. | |
| private final AtomicInteger |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| public boolean | |
| private boolean |
| creationNanoTime | back to summary |
|---|---|
| private final long creationNanoTime | |
| entry | back to summary |
|---|---|
| private final Pool. | |
| usage | back to summary |
|---|---|
| private final AtomicInteger usage | |
| EntryHolder | back to summary |
|---|---|
| private EntryHolder(Pool. | |
| isExpired | back to summary |
|---|---|
| private boolean isExpired(long timeoutNanos) | |
| isOverUsed | back to summary |
|---|---|
| public boolean isOverUsed(int maxUsage) | |
| use | back to summary |
|---|---|
| private boolean use(int maxUsage) | |
| Modifier and Type | Field and Description |
|---|---|
| private final Pool. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | failed(Throwable
the reason for the operation failure x)Overrides org. Overrides default org. Callback invoked when the operation fails. |
| public void | succeeded(Connection
the context connection)Overrides org. Overrides default org. Callback invoked when the operation completes. |
| reserved | back to summary |
|---|---|
| private final Pool. | |
| FutureConnection | back to summary |
|---|---|
| public FutureConnection(Pool. | |
| failed | back to summary |
|---|---|
| public void failed(Throwable x) Overrides org. Overrides default org. Doc from org. Callback invoked when the operation fails. | |
| succeeded | back to summary |
|---|---|
| public void succeeded(Connection connection) Overrides org. Overrides default org. Doc from org. Callback invoked when the operation completes.
| |