Class HonorCloseOnReleaseChannelPool

java.lang.Object
software.amazon.awssdk.http.nio.netty.internal.HonorCloseOnReleaseChannelPool
All Implemented Interfaces:
io.netty.channel.pool.ChannelPool, Closeable, AutoCloseable

public class HonorCloseOnReleaseChannelPool extends Object implements io.netty.channel.pool.ChannelPool
Wrap a channel pool so that ChannelAttributeKey.CLOSE_ON_RELEASE is honored when a channel is released to the underlying pool. When a channel is released and ChannelAttributeKey.CLOSE_ON_RELEASE is true on the channel, the channel will be closed before it is released to the underlying pool.
  • Constructor Summary

    Constructors
    Constructor
    Description
    HonorCloseOnReleaseChannelPool(io.netty.channel.pool.ChannelPool delegatePool)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.netty.util.concurrent.Future<io.netty.channel.Channel>
     
    io.netty.util.concurrent.Future<io.netty.channel.Channel>
    acquire(io.netty.util.concurrent.Promise<io.netty.channel.Channel> promise)
     
    void
     
    io.netty.util.concurrent.Future<Void>
    release(io.netty.channel.Channel channel)
     
    io.netty.util.concurrent.Future<Void>
    release(io.netty.channel.Channel channel, io.netty.util.concurrent.Promise<Void> promise)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HonorCloseOnReleaseChannelPool

      public HonorCloseOnReleaseChannelPool(io.netty.channel.pool.ChannelPool delegatePool)
  • Method Details

    • acquire

      public io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire()
      Specified by:
      acquire in interface io.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:
      acquire in interface io.netty.channel.pool.ChannelPool
    • release

      public io.netty.util.concurrent.Future<Void> release(io.netty.channel.Channel channel)
      Specified by:
      release in interface io.netty.channel.pool.ChannelPool
    • release

      public io.netty.util.concurrent.Future<Void> release(io.netty.channel.Channel channel, io.netty.util.concurrent.Promise<Void> promise)
      Specified by:
      release in interface io.netty.channel.pool.ChannelPool
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface io.netty.channel.pool.ChannelPool
      Specified by:
      close in interface Closeable