public class HealthCheckedChannelPool extends Object implements io.netty.channel.pool.ChannelPool
ChannelPool
that validates the health of its connections.
This wraps another ChannelPool
, and verifies:
NettyConfiguration.connectionAcquireTimeoutMillis()
timeout is reached.Constructor and Description |
---|
HealthCheckedChannelPool(io.netty.channel.EventLoopGroup eventLoopGroup,
NettyConfiguration configuration,
io.netty.channel.pool.ChannelPool delegate) |
Modifier and Type | Method and Description |
---|---|
io.netty.util.concurrent.Future<io.netty.channel.Channel> |
acquire() |
io.netty.util.concurrent.Future<io.netty.channel.Channel> |
acquire(io.netty.util.concurrent.Promise<io.netty.channel.Channel> resultFuture) |
void |
close() |
io.netty.util.concurrent.Future<Void> |
release(io.netty.channel.Channel channel) |
io.netty.util.concurrent.Future<Void> |
release(io.netty.channel.Channel channel,
io.netty.util.concurrent.Promise<Void> promise) |
public HealthCheckedChannelPool(io.netty.channel.EventLoopGroup eventLoopGroup, NettyConfiguration configuration, io.netty.channel.pool.ChannelPool delegate)
public io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire()
acquire
in interface io.netty.channel.pool.ChannelPool
public io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire(io.netty.util.concurrent.Promise<io.netty.channel.Channel> resultFuture)
acquire
in interface io.netty.channel.pool.ChannelPool
public io.netty.util.concurrent.Future<Void> release(io.netty.channel.Channel channel)
release
in interface io.netty.channel.pool.ChannelPool
public 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.ChannelPool
public void close()
close
in interface io.netty.channel.pool.ChannelPool
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2019. All rights reserved.