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
@SdkInternalApi
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final booleanfinal Pfinal booleanisEmpty()Returnstrueif theAbstractChannelPoolMapis empty, otherwisefalse.iterator()pools()final booleanRemove theChannelPoolfrom thisAbstractChannelPoolMap.final intsize()Returns the number ofChannelPools currently in thisAbstractChannelPoolMap.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SdkChannelPoolMap
public SdkChannelPoolMap()
-
-
Method Details
-
get
-
remove
Remove theChannelPoolfrom thisAbstractChannelPoolMap. Returnstrueif removed,falseotherwise. Please note thatnullkeys are not allowed. -
iterator
-
size
public final int size()Returns the number ofChannelPools currently in thisAbstractChannelPoolMap. -
isEmpty
public final boolean isEmpty()Returnstrueif theAbstractChannelPoolMapis empty, otherwisefalse. -
contains
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
pools
-