public class IdleConnectionCountingChannelPool extends Object implements SdkChannelPool
Specifically, this pool counts the number of channels acquired and then released from/to the underlying channel pool. It will monitor for the underlying channels to be closed, and will remove them from the "idle" count.
| Constructor and Description |
|---|
IdleConnectionCountingChannelPool(io.netty.util.concurrent.EventExecutor executor,
io.netty.channel.pool.ChannelPool delegatePool) |
| Modifier and Type | Method and Description |
|---|---|
io.netty.util.concurrent.Future<io.netty.channel.Channel> |
acquire() |
io.netty.util.concurrent.Future<io.netty.channel.Channel> |
acquire(io.netty.util.concurrent.Promise<io.netty.channel.Channel> promise) |
void |
close() |
CompletableFuture<Void> |
collectChannelPoolMetrics(MetricCollector metrics)
Collect channel pool metrics into the provided
MetricCollector collection, completing the returned future when
all metric publishing is complete. |
io.netty.util.concurrent.Future<Void> |
release(io.netty.channel.Channel channel) |
io.netty.util.concurrent.Future<Void> |
release(io.netty.channel.Channel channel,
io.netty.util.concurrent.Promise<Void> promise) |
public IdleConnectionCountingChannelPool(io.netty.util.concurrent.EventExecutor executor,
io.netty.channel.pool.ChannelPool delegatePool)
public io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire()
acquire in interface io.netty.channel.pool.ChannelPoolpublic io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire(io.netty.util.concurrent.Promise<io.netty.channel.Channel> promise)
acquire in interface io.netty.channel.pool.ChannelPoolpublic io.netty.util.concurrent.Future<Void> release(io.netty.channel.Channel channel)
release in interface io.netty.channel.pool.ChannelPoolpublic io.netty.util.concurrent.Future<Void> release(io.netty.channel.Channel channel, io.netty.util.concurrent.Promise<Void> promise)
release in interface io.netty.channel.pool.ChannelPoolpublic void close()
close in interface io.netty.channel.pool.ChannelPoolclose in interface Closeableclose in interface AutoCloseablepublic CompletableFuture<Void> collectChannelPoolMetrics(MetricCollector metrics)
SdkChannelPoolMetricCollector collection, completing the returned future when
all metric publishing is complete.collectChannelPoolMetrics in interface SdkChannelPoolmetrics - The collection to which all metrics should be added.Copyright © 2021. All rights reserved.