Class CancellableAcquireChannelPool
java.lang.Object
software.amazon.awssdk.http.nio.netty.internal.CancellableAcquireChannelPool
- All Implemented Interfaces:
- io.netty.channel.pool.ChannelPool,- Closeable,- AutoCloseable,- SdkChannelPool
@SdkInternalApi
public final class CancellableAcquireChannelPool
extends Object
implements SdkChannelPool
Simple decorator 
ChannelPool that attempts to complete the promise
 given to acquire(Promise) with the channel acquired from the underlying
 pool. If it fails (because the promise is already done), the acquired channel
 is closed then released back to the delegate.- 
Constructor SummaryConstructorsConstructorDescriptionCancellableAcquireChannelPool(io.netty.util.concurrent.EventExecutor executor, SdkChannelPool delegatePool) 
- 
Method SummaryModifier 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> acquirePromise) 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- 
CancellableAcquireChannelPoolpublic CancellableAcquireChannelPool(io.netty.util.concurrent.EventExecutor executor, SdkChannelPool delegatePool) 
 
- 
- 
Method Details- 
acquirepublic io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire()- Specified by:
- acquirein interface- io.netty.channel.pool.ChannelPool
 
- 
acquirepublic io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire(io.netty.util.concurrent.Promise<io.netty.channel.Channel> acquirePromise) - Specified by:
- acquirein interface- io.netty.channel.pool.ChannelPool
 
- 
release- Specified by:
- releasein interface- io.netty.channel.pool.ChannelPool
 
- 
release
- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- io.netty.channel.pool.ChannelPool
- Specified by:
- closein interface- Closeable
 
- 
collectChannelPoolMetricsDescription copied from interface:SdkChannelPoolCollect channel pool metrics into the providedMetricCollectorcollection, completing the returned future when all metric publishing is complete.- Specified by:
- collectChannelPoolMetricsin interface- SdkChannelPool
- Parameters:
- metrics- The collection to which all metrics should be added.
- Returns:
- A future that is completed when all metric publishing is complete.
 
 
-