public interface ChannelPool
extends java.io.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<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
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
Copyright © 2008–2018 The Netty Project. All rights reserved.