public class Http2MultiplexedChannelPool extends Object implements SdkChannelPool
ChannelPool implementation that handles multiplexed streams. Child channels are created
for each HTTP/2 stream using Http2StreamChannelBootstrap with the parent channel being
the actual socket channel. This implementation assumes that all connections have the same setting
for MAX_CONCURRENT_STREAMS. Concurrent requests are load balanced across all available connections,
when the max concurrency for a connection is reached then a new connection will be opened.
Note: This enforces no max concurrency. Relies on being wrapped with a BetterFixedChannelPool
to enforce max concurrency which gives a bunch of other good features like timeouts, max pending acquires, etc.
| 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 childChannel) |
io.netty.util.concurrent.Future<Void> |
release(io.netty.channel.Channel childChannel,
io.netty.util.concurrent.Promise<Void> promise) |
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 childChannel)
release in interface io.netty.channel.pool.ChannelPoolpublic io.netty.util.concurrent.Future<Void> release(io.netty.channel.Channel childChannel, 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 © 2023. All rights reserved.