public class Http2MultiplexedChannelPool extends Object implements io.netty.channel.pool.ChannelPool
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() |
io.netty.util.concurrent.Future<Void> |
release(io.netty.channel.Channel childChannel) |
io.netty.util.concurrent.Future<Void> |
release(io.netty.channel.Channel channel,
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 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 AutoCloseableCopyright © 2019. All rights reserved.