Class HttpOrHttp2ChannelPool
java.lang.Object
software.amazon.awssdk.http.nio.netty.internal.http2.HttpOrHttp2ChannelPool
- All Implemented Interfaces:
io.netty.channel.pool.ChannelPool,Closeable,AutoCloseable,SdkChannelPool
Channel pool that establishes an initial connection to determine protocol. Delegates
to appropriate channel pool implementation depending on the protocol. This assumes that
all connections will be negotiated with the same protocol.
-
Constructor Summary
ConstructorsConstructorDescriptionHttpOrHttp2ChannelPool(io.netty.channel.pool.ChannelPool delegatePool, io.netty.channel.EventLoopGroup group, int maxConcurrency, NettyConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionio.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()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 channel) io.netty.util.concurrent.Future<Void>
-
Constructor Details
-
HttpOrHttp2ChannelPool
public HttpOrHttp2ChannelPool(io.netty.channel.pool.ChannelPool delegatePool, io.netty.channel.EventLoopGroup group, int maxConcurrency, NettyConfiguration configuration)
-
-
Method Details
-
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
- Specified by:
releasein interfaceio.netty.channel.pool.ChannelPool
-
release
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceio.netty.channel.pool.ChannelPool- Specified by:
closein interfaceCloseable
-
collectChannelPoolMetrics
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.
-