public class ChannelPoolLifecycle
extends java.lang.Object
implements com.linkedin.r2.transport.http.client.AsyncPool.Lifecycle<io.netty.channel.Channel>
| Modifier and Type | Field and Description |
|---|---|
static io.netty.util.AttributeKey<java.lang.Long> |
CHANNEL_CREATION_TIME_KEY |
static java.lang.String |
CHANNELPOOL_SSL_CALLBACK_HANDLER |
static int |
INITIAL_PERIOD_BEFORE_RETRY_CONNECTIONS
When back-off policies are triggered in channel creation for the first time, this is the amount in ms to wait
before a second attempt
|
static int |
MAX_PERIOD_BEFORE_RETRY_CONNECTIONS
Maximum period in ms between retries for creating a channel in back-off policies
|
| Constructor and Description |
|---|
ChannelPoolLifecycle(java.net.SocketAddress address,
io.netty.bootstrap.Bootstrap bootstrap,
io.netty.channel.group.ChannelGroup channelGroup,
boolean tcpNoDelay) |
| Modifier and Type | Method and Description |
|---|---|
void |
create(com.linkedin.common.callback.Callback<io.netty.channel.Channel> channelCallback) |
void |
destroy(io.netty.channel.Channel channel,
boolean error,
com.linkedin.common.callback.Callback<io.netty.channel.Channel> channelCallback) |
com.linkedin.r2.transport.http.client.PoolStats.LifecycleStats |
getStats() |
boolean |
validateGet(io.netty.channel.Channel c) |
boolean |
validatePut(io.netty.channel.Channel c) |
public static final io.netty.util.AttributeKey<java.lang.Long> CHANNEL_CREATION_TIME_KEY
public static final int MAX_PERIOD_BEFORE_RETRY_CONNECTIONS
public static final int INITIAL_PERIOD_BEFORE_RETRY_CONNECTIONS
public static final java.lang.String CHANNELPOOL_SSL_CALLBACK_HANDLER
public ChannelPoolLifecycle(java.net.SocketAddress address,
io.netty.bootstrap.Bootstrap bootstrap,
io.netty.channel.group.ChannelGroup channelGroup,
boolean tcpNoDelay)
public void create(com.linkedin.common.callback.Callback<io.netty.channel.Channel> channelCallback)
create in interface com.linkedin.r2.transport.http.client.AsyncPool.Lifecycle<io.netty.channel.Channel>public boolean validateGet(io.netty.channel.Channel c)
validateGet in interface com.linkedin.r2.transport.http.client.AsyncPool.Lifecycle<io.netty.channel.Channel>public boolean validatePut(io.netty.channel.Channel c)
validatePut in interface com.linkedin.r2.transport.http.client.AsyncPool.Lifecycle<io.netty.channel.Channel>public void destroy(io.netty.channel.Channel channel,
boolean error,
com.linkedin.common.callback.Callback<io.netty.channel.Channel> channelCallback)
destroy in interface com.linkedin.r2.transport.http.client.AsyncPool.Lifecycle<io.netty.channel.Channel>public com.linkedin.r2.transport.http.client.PoolStats.LifecycleStats getStats()
getStats in interface com.linkedin.r2.transport.http.client.AsyncPool.Lifecycle<io.netty.channel.Channel>