Package io.netty.channel.pool
Interface ChannelPool
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
FixedChannelPool,SimpleChannelPool
Allows to acquire and release
Channel and so act as a pool of these.-
Method Summary
Modifier and TypeMethodDescriptionacquire()Acquire aChannelfrom thisChannelPool.Acquire aChannelfrom thisChannelPool.voidclose()Release aChannelback to thisChannelPool.Release aChannelback to thisChannelPool.
-
Method Details
-
acquire
Acquire aChannelfrom thisChannelPool. The returnedFutureis notified once the acquire is successful and failed otherwise. Its important that an acquired is always released to the pool again, even if theChannelis explicitly closed.. -
acquire
Acquire aChannelfrom thisChannelPool. The givenPromiseis notified once the acquire is successful and failed otherwise. Its important that an acquired is always released to the pool again, even if theChannelis explicitly closed.. -
release
Release aChannelback to thisChannelPool. The returnedFutureis notified once the release is successful and failed otherwise. When failed theChannelwill automatically closed. -
release
Release aChannelback to thisChannelPool. The givenPromiseis notified once the release is successful and failed otherwise. When failed theChannelwill automatically closed. -
close
void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-