ChannelPool implementation that takes another ChannelPool implementation and enforce a maximum
number of concurrent connections.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | |
| public static enum | |
| private static class | |
| private abstract class |
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicInteger | |
| private final long | |
| private boolean | |
| private final EventExecutor | |
| private final int | |
| private final int | |
| private int | |
| private final Queue | |
| private final Runnable |
| Access | Constructor and Description |
|---|---|
| public | FixedChannelPool(Bootstrap
the bootstrap, ChannelPoolHandler Bootstrap that is used for connectionsthe handler, int ChannelPoolHandler that will be notified for the different pool actionsthe number of maximal active connections, once this is reached new tries to acquire
a maxConnections)Channel will be delayed until a connection is returned to the pool again.Creates a new instance using the |
| public | FixedChannelPool(Bootstrap
the bootstrap, ChannelPoolHandler Bootstrap that is used for connectionsthe handler, int ChannelPoolHandler that will be notified for the different pool actionsthe number of maximal active connections, once this is reached new tries to
acquire a maxConnections, int Channel will be delayed until a connection is returned to the
pool again.the maximum number of pending acquires. Once this is exceed acquire tries will
be failed. maxPendingAcquires)Creates a new instance using the |
| public | FixedChannelPool(Bootstrap
the bootstrap, ChannelPoolHandler Bootstrap that is used for connectionsthe handler, ChannelHealthChecker ChannelPoolHandler that will be notified for the different pool actionsthe healthCheck, FixedChannelPool.ChannelHealthChecker that will be used to check if a Channel is
still healthy when obtain from the ChannelPoolthe action,AcquireTimeoutAction to use or null if non should be used.
In this case {@param acquireTimeoutMillis} must be -1.the time (in milliseconds) after which an pending acquire must complete or
the acquireTimeoutMillis, int AcquireTimeoutAction takes place.the number of maximal active connections, once this is reached new tries to
acquire a maxConnections, int Channel will be delayed until a connection is returned to the
pool again.the maximum number of pending acquires. Once this is exceed acquire tries will
be failed. maxPendingAcquires)Creates a new instance. |
| public | FixedChannelPool(Bootstrap
the bootstrap, ChannelPoolHandler Bootstrap that is used for connectionsthe handler, ChannelHealthChecker ChannelPoolHandler that will be notified for the different pool actionsthe healthCheck, FixedChannelPool.ChannelHealthChecker that will be used to check if a Channel is
still healthy when obtain from the ChannelPoolthe action,AcquireTimeoutAction to use or null if non should be used.
In this case {@param acquireTimeoutMillis} must be -1.the time (in milliseconds) after which an pending acquire must complete or
the acquireTimeoutMillis, int AcquireTimeoutAction takes place.the number of maximal active connections, once this is reached new tries to
acquire a maxConnections, int Channel will be delayed until a connection is returned to the
pool again.the maximum number of pending acquires. Once this is exceed acquire tries will
be failed. maxPendingAcquires, final boolean will check channel health before offering back if this parameter set to
releaseHealthCheck)true.Creates a new instance. |
| public | FixedChannelPool(Bootstrap
the bootstrap, ChannelPoolHandler Bootstrap that is used for connectionsthe handler, ChannelHealthChecker ChannelPoolHandler that will be notified for the different pool actionsthe healthCheck, FixedChannelPool.ChannelHealthChecker that will be used to check if a Channel is
still healthy when obtain from the ChannelPoolthe action,AcquireTimeoutAction to use or null if non should be used.
In this case {@param acquireTimeoutMillis} must be -1.the time (in milliseconds) after which an pending acquire must complete or
the acquireTimeoutMillis, int AcquireTimeoutAction takes place.the number of maximal active connections, once this is reached new tries to
acquire a maxConnections, int Channel will be delayed until a connection is returned to the
pool again.the maximum number of pending acquires. Once this is exceed acquire tries will
be failed. maxPendingAcquires, boolean will check channel health before offering back if this parameter set to
releaseHealthCheck, boolean lastRecentUsed)true.Creates a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| public Future | acquire(final Promise<Channel> promise)
Overrides io. Implements io. Channel from this ChannelPool.
|
| private void | |
| public int | |
| public void | close()
Overrides io. Implements io. |
| private Future | |
| public Future | Returns: Future which represents completion of the close taskOverrides io. |
| private void | |
| public Future | release(final Channel channel, final Promise<Void> promise)
Overrides io. Implements io. Channel back to this ChannelPool.
|
| private void | |
| private void |
| acquiredChannelCount | back to summary |
|---|---|
| private final AtomicInteger acquiredChannelCount | |
| acquireTimeoutNanos | back to summary |
|---|---|
| private final long acquireTimeoutNanos | |
| closed | back to summary |
|---|---|
| private boolean closed | |
| executor | back to summary |
|---|---|
| private final EventExecutor executor | |
| maxConnections | back to summary |
|---|---|
| private final int maxConnections | |
| maxPendingAcquires | back to summary |
|---|---|
| private final int maxPendingAcquires | |
| pendingAcquireCount | back to summary |
|---|---|
| private int pendingAcquireCount | |
| pendingAcquireQueue | back to summary |
|---|---|
| private final Queue<FixedChannelPool. | |
| timeoutTask | back to summary |
|---|---|
| private final Runnable timeoutTask | |
| FixedChannelPool | back to summary |
|---|---|
| public FixedChannelPool(Bootstrap bootstrap, ChannelPoolHandler handler, int maxConnections) Creates a new instance using the
| |
| FixedChannelPool | back to summary |
|---|---|
| public FixedChannelPool(Bootstrap bootstrap, ChannelPoolHandler handler, int maxConnections, int maxPendingAcquires) Creates a new instance using the
| |
| FixedChannelPool | back to summary |
|---|---|
| public FixedChannelPool(Bootstrap bootstrap, ChannelPoolHandler handler, ChannelHealthChecker healthCheck, FixedChannelPool. Creates a new instance.
| |
| FixedChannelPool | back to summary |
|---|---|
| public FixedChannelPool(Bootstrap bootstrap, ChannelPoolHandler handler, ChannelHealthChecker healthCheck, FixedChannelPool. Creates a new instance.
| |
| FixedChannelPool | back to summary |
|---|---|
| public FixedChannelPool(Bootstrap bootstrap, ChannelPoolHandler handler, ChannelHealthChecker healthCheck, FixedChannelPool. Creates a new instance.
| |
| acquire | back to summary |
|---|---|
| public Future Overrides io. Implements io. Doc from io. Acquire a
| |
| acquire0 | back to summary |
|---|---|
| private void acquire0(final Promise<Channel> promise) | |
| acquiredChannelCount | back to summary |
|---|---|
| public int acquiredChannelCount() Returns the number of acquired channels that this pool thinks it has. | |
| close | back to summary |
|---|---|
| public void close() Overrides io. Implements io. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| close0 | back to summary |
|---|---|
| private Future | |
| closeAsync | back to summary |
|---|---|
| public Future Overrides io. Closes the pool in an async manner. | |
| decrementAndRunTaskQueue | back to summary |
|---|---|
| private void decrementAndRunTaskQueue() | |
| release | back to summary |
|---|---|
| public Future Overrides io. Implements io. Doc from io. Release a
| |
| runTaskQueue | back to summary |
|---|---|
| private void runTaskQueue() | |
| tooManyOutstanding | back to summary |
|---|---|
| private void tooManyOutstanding(Promise<?> promise) | |
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | |
| private final Promise |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | operationComplete(Future<Channel>
the source future)Future which called this callbackImplements io. Future has been completed.
|
| acquired | back to summary |
|---|---|
| protected boolean acquired | |
| originalPromise | back to summary |
|---|---|
| private final Promise<Channel> originalPromise | |
| AcquireListener | back to summary |
|---|---|
| pack-priv AcquireListener(Promise<Channel> originalPromise) | |
| acquired | back to summary |
|---|---|
| public void acquired() | |
| operationComplete | back to summary |
|---|---|
| public void operationComplete(Future<Channel> future) throws Exception Implements io. Doc from io. Invoked when the operation associated with the | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final long | |
| pack-priv final Promise | |
| pack-priv ScheduledFuture |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| expireNanoTime | back to summary |
|---|---|
| pack-priv final long expireNanoTime | |
| promise | back to summary |
|---|---|
| pack-priv final Promise<Channel> promise | |
| timeoutFuture | back to summary |
|---|---|
| pack-priv ScheduledFuture<?> timeoutFuture | |
| AcquireTask | back to summary |
|---|---|
| pack-priv AcquireTask(Promise<Channel> promise) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final FixedChannelPool. | FAIL
Fail the |
| public static final FixedChannelPool. | NEW
Create a new connection when the timeout is detected. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static FixedChannelPool. | |
| public static FixedChannelPool. |
| FAIL | back to summary |
|---|---|
| public static final FixedChannelPool. Fail the | |
| NEW | back to summary |
|---|---|
| public static final FixedChannelPool. Create a new connection when the timeout is detected. | |
| AcquireTimeoutAction | back to summary |
|---|---|
| private AcquireTimeoutAction() | |
| valueOf | back to summary |
|---|---|
| public static FixedChannelPool. | |
| values | back to summary |
|---|---|
| public static FixedChannelPool. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Throwable | fillInStackTrace()
Overrides java. |
| AcquireTimeoutException | back to summary |
|---|---|
| private AcquireTimeoutException() | |
| fillInStackTrace | back to summary |
|---|---|
| public Throwable fillInStackTrace() Overrides java. Doc from java. Fills in the execution stack trace. This method records within this
If the stack trace of this | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| public final void |
| TimeoutTask | back to summary |
|---|---|
| private TimeoutTask() | |
| onTimeout | back to summary |
|---|---|
| public abstract void onTimeout(FixedChannelPool. | |
| run | back to summary |
|---|---|
| public final void run() Implements java. Doc from java. Runs this operation.
| |