public interface ChannelPool extends Closeable
Channel
and so act as a pool of these.Modifier and Type | Method and Description |
---|---|
Future<Channel> |
acquire()
Acquire a
Channel from this ChannelPool . |
Future<Channel> |
acquire(Promise<Channel> promise)
Acquire a
Channel from this ChannelPool . |
void |
close() |
Future<Void> |
release(Channel channel)
Release a
Channel back to this ChannelPool . |
Future<Void> |
release(Channel channel,
Promise<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<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<Void> release(Channel channel, Promise<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
in interface AutoCloseable
close
in interface Closeable
Copyright © 2008–2017 The Netty Project. All rights reserved.