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 aChannel
from thisChannelPool
.Acquire aChannel
from thisChannelPool
.void
close()
Release aChannel
back to thisChannelPool
.Release aChannel
back to thisChannelPool
.
-
Method Details
-
acquire
Acquire aChannel
from thisChannelPool
. The returnedFuture
is notified once the acquire is successful and failed otherwise. Its important that an acquired is always released to the pool again, even if theChannel
is explicitly closed.. -
acquire
Acquire aChannel
from thisChannelPool
. The givenPromise
is notified once the acquire is successful and failed otherwise. Its important that an acquired is always released to the pool again, even if theChannel
is explicitly closed.. -
release
Release aChannel
back to thisChannelPool
. The returnedFuture
is notified once the release is successful and failed otherwise. When failed theChannel
will automatically closed. -
release
Release aChannel
back to thisChannelPool
. The givenPromise
is notified once the release is successful and failed otherwise. When failed theChannel
will automatically closed. -
close
void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-