public interface ChannelPool
extends java.io.Closeable
Channel
and so act as a pool of these.限定符和类型 | 方法和说明 |
---|---|
Future<Channel> |
acquire()
Acquire a
Channel from this ChannelPool . |
Future<Channel> |
acquire(Promise<Channel> promise)
Acquire a
Channel from this ChannelPool . |
void |
close() |
Future<java.lang.Void> |
release(Channel channel)
Release a
Channel back to this ChannelPool . |
Future<java.lang.Void> |
release(Channel channel,
Promise<java.lang.Void> promise)
Release a
Channel back to this ChannelPool . |
Future<Channel> acquire()
Channel
from this ChannelPool
. The returned Future
is notified once
the acquire is successful and failed otherwise.
Its important that an acquired is always released to the pool again, even if the Channel
is explicitly closed..Future<Channel> acquire(Promise<Channel> promise)
Channel
from this ChannelPool
. The given Promise
is notified once
the acquire is successful and failed otherwise.
Its important that an acquired is always released to the pool again, even if the Channel
is explicitly closed..Future<java.lang.Void> release(Channel channel)
Channel
back to this ChannelPool
. The returned Future
is notified once
the release is successful and failed otherwise. When failed the Channel
will automatically closed.Future<java.lang.Void> release(Channel channel, Promise<java.lang.Void> promise)
Channel
back to this ChannelPool
. The given Promise
is notified once
the release is successful and failed otherwise. When failed the Channel
will automatically closed.void close()
close
在接口中 java.lang.AutoCloseable
close
在接口中 java.io.Closeable