public final class RntbdClientChannelPool
extends io.netty.channel.pool.SimpleChannelPool
ChannelPool implementation that enforces a maximum number of concurrent direct TCP Cosmos connections| Modifier and Type | Method and Description |
|---|---|
io.netty.util.concurrent.Future<io.netty.channel.Channel> |
acquire(io.netty.util.concurrent.Promise<io.netty.channel.Channel> promise) |
int |
channelsAcquired() |
int |
channelsAvailable() |
void |
close() |
boolean |
isClosed() |
int |
maxChannels() |
int |
maxRequestsPerChannel() |
protected boolean |
offerChannel(io.netty.channel.Channel channel)
Offer a
Channel back to the internal storage |
protected io.netty.channel.Channel |
pollChannel()
Poll a
Channel out of internal storage to reuse it |
io.netty.util.concurrent.Future<Void> |
release(io.netty.channel.Channel channel,
io.netty.util.concurrent.Promise<Void> promise) |
SocketAddress |
remoteAddress() |
int |
requestQueueLength() |
String |
toString() |
long |
usedDirectMemory() |
long |
usedHeapMemory() |
public int channelsAcquired()
public int channelsAvailable()
public int maxChannels()
public int maxRequestsPerChannel()
public SocketAddress remoteAddress()
public int requestQueueLength()
public long usedDirectMemory()
public long usedHeapMemory()
public boolean isClosed()
public io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire(io.netty.util.concurrent.Promise<io.netty.channel.Channel> promise)
acquire in interface io.netty.channel.pool.ChannelPoolacquire in class io.netty.channel.pool.SimpleChannelPoolpublic void close()
close in interface io.netty.channel.pool.ChannelPoolclose in interface Closeableclose in interface AutoCloseableclose in class io.netty.channel.pool.SimpleChannelPoolpublic io.netty.util.concurrent.Future<Void> release(io.netty.channel.Channel channel, io.netty.util.concurrent.Promise<Void> promise)
release in interface io.netty.channel.pool.ChannelPoolrelease in class io.netty.channel.pool.SimpleChannelPoolprotected boolean offerChannel(io.netty.channel.Channel channel)
Channel back to the internal storage
Maintainers: Implementations of this method must be thread-safe.
offerChannel in class io.netty.channel.pool.SimpleChannelPoolchannel - the Channel to return to internal storagetrue, if the Channel could be added to internal storage; otherwise falseprotected io.netty.channel.Channel pollChannel()
Channel out of internal storage to reuse it
Maintainers: Implementations of this method must be thread-safe and this type ensures thread safety by calling this method serially on a single-threaded EventExecutor. As a result this method need not (and should not) be synchronized.
pollChannel in class io.netty.channel.pool.SimpleChannelPoolnull, if no Channel is ready to be reusedacquire(Promise)Copyright © 2020. All rights reserved.