Class Http2MultiplexedChannelPool
- java.lang.Object
-
- software.amazon.awssdk.http.nio.netty.internal.http2.Http2MultiplexedChannelPool
-
- All Implemented Interfaces:
io.netty.channel.pool.ChannelPool,Closeable,AutoCloseable,SdkChannelPool
public class Http2MultiplexedChannelPool extends Object implements SdkChannelPool
ChannelPoolimplementation that handles multiplexed streams. Child channels are created for each HTTP/2 stream usingHttp2StreamChannelBootstrapwith 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
BetterFixedChannelPoolto enforce max concurrency which gives a bunch of other good features like timeouts, max pending acquires, etc.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)voidclose()CompletableFuture<Void>collectChannelPoolMetrics(MetricCollector metrics)Collect channel pool metrics into the providedMetricCollectorcollection, 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)
-
-
-
Method Detail
-
acquire
public io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire()
- Specified by:
acquirein interfaceio.netty.channel.pool.ChannelPool
-
acquire
public io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire(io.netty.util.concurrent.Promise<io.netty.channel.Channel> promise)
- Specified by:
acquirein interfaceio.netty.channel.pool.ChannelPool
-
release
public io.netty.util.concurrent.Future<Void> release(io.netty.channel.Channel childChannel)
- Specified by:
releasein interfaceio.netty.channel.pool.ChannelPool
-
release
public io.netty.util.concurrent.Future<Void> release(io.netty.channel.Channel childChannel, io.netty.util.concurrent.Promise<Void> promise)
- Specified by:
releasein interfaceio.netty.channel.pool.ChannelPool
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceio.netty.channel.pool.ChannelPool- Specified by:
closein interfaceCloseable
-
collectChannelPoolMetrics
public CompletableFuture<Void> collectChannelPoolMetrics(MetricCollector metrics)
Description copied from interface:SdkChannelPoolCollect channel pool metrics into the providedMetricCollectorcollection, completing the returned future when all metric publishing is complete.- Specified by:
collectChannelPoolMetricsin interfaceSdkChannelPool- Parameters:
metrics- The collection to which all metrics should be added.- Returns:
- A future that is completed when all metric publishing is complete.
-
-