Class SdkChannelPoolMap<K,P extends io.netty.channel.pool.ChannelPool>

java.lang.Object
software.amazon.awssdk.http.nio.netty.internal.SdkChannelPoolMap<K,P>
All Implemented Interfaces:
io.netty.channel.pool.ChannelPoolMap<K,P>, Closeable, AutoCloseable, Iterable<Map.Entry<K,P>>
Direct Known Subclasses:
AwaitCloseChannelPoolMap

public abstract class SdkChannelPoolMap<K,P extends io.netty.channel.pool.ChannelPool> extends Object implements io.netty.channel.pool.ChannelPoolMap<K,P>, Iterable<Map.Entry<K,P>>, Closeable
Replacement for AbstractChannelPoolMap. This implementation guarantees only one instance of a ChannelPool is created for each key.
  • Constructor Details

    • SdkChannelPoolMap

      public SdkChannelPoolMap()
  • Method Details

    • get

      public final P get(K key)
      Specified by:
      get in interface io.netty.channel.pool.ChannelPoolMap<K,P extends io.netty.channel.pool.ChannelPool>
    • remove

      public final boolean remove(K key)
      Remove the ChannelPool from this AbstractChannelPoolMap. Returns true if removed, false otherwise. Please note that null keys are not allowed.
    • iterator

      public final Iterator<Map.Entry<K,P>> iterator()
      Specified by:
      iterator in interface Iterable<K>
    • size

      public final int size()
      Returns the number of ChannelPools currently in this AbstractChannelPoolMap.
    • isEmpty

      public final boolean isEmpty()
      Returns true if the AbstractChannelPoolMap is empty, otherwise false.
    • contains

      public final boolean contains(K key)
      Specified by:
      contains in interface io.netty.channel.pool.ChannelPoolMap<K,P extends io.netty.channel.pool.ChannelPool>
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • pools

      public final Map<K,P> pools()