| Constructor and Description |
|---|
BoundedChannelPool(java.util.concurrent.Semaphore semaphore,
io.netty.handler.codec.http.HttpVersion httpVersion,
boolean isSecure,
java.util.List<K> nodes,
io.netty.bootstrap.Bootstrap bootstrap,
io.netty.channel.pool.ChannelPoolHandler channelPoolHandler,
int retriesPerNode) |
| Modifier and Type | Method and Description |
|---|---|
io.netty.channel.Channel |
acquire() |
int |
acquire(java.util.List<io.netty.channel.Channel> channels,
int maxCount) |
void |
close() |
io.netty.util.AttributeKey<K> |
getAttributeKey() |
io.netty.handler.codec.http.HttpVersion |
getVersion() |
boolean |
isSecure() |
void |
prepare(int channelCount) |
void |
release(io.netty.channel.Channel channel) |
void |
release(java.util.List<io.netty.channel.Channel> channels) |
public BoundedChannelPool(java.util.concurrent.Semaphore semaphore,
io.netty.handler.codec.http.HttpVersion httpVersion,
boolean isSecure,
java.util.List<K> nodes,
io.netty.bootstrap.Bootstrap bootstrap,
io.netty.channel.pool.ChannelPoolHandler channelPoolHandler,
int retriesPerNode)
semaphore - the concurrency levelhttpVersion - the HTTP version of the pool connectionsisSecure - if this pool has secure connectionsnodes - the endpoint nodes, any element may contain the port (followed after ":")
to override the defaultPort argumentbootstrap - bootstrap instancechannelPoolHandler - channel pool handler being notified upon new connection is createdretriesPerNode - the max count of the subsequent connection failures to the node before
the node will be excluded from the pool. If set to 0, the value is ignored.public io.netty.handler.codec.http.HttpVersion getVersion()
public boolean isSecure()
public io.netty.util.AttributeKey<K> getAttributeKey()
public void prepare(int channelCount)
throws java.net.ConnectException
public io.netty.channel.Channel acquire()
throws java.lang.Exception
public int acquire(java.util.List<io.netty.channel.Channel> channels,
int maxCount)
throws java.lang.Exception
public void release(io.netty.channel.Channel channel)
throws java.lang.Exception
public void release(java.util.List<io.netty.channel.Channel> channels)
throws java.lang.Exception
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseable