[#5455] Clarify ChannelPool javadocs
Motivation: We should make it clear that each acquired Channel needs to be released in all cases. Modifications: More clear javadocs. Result: Harder for users to leak Channel.
This commit is contained in:
parent
7c2f1f5fd7
commit
9a82b76158
@ -30,12 +30,18 @@ public interface ChannelPool extends Closeable {
|
|||||||
/**
|
/**
|
||||||
* Acquire a {@link Channel} from this {@link ChannelPool}. The returned {@link Future} is notified once
|
* Acquire a {@link Channel} from this {@link ChannelPool}. The returned {@link Future} is notified once
|
||||||
* the acquire is successful and failed otherwise.
|
* the acquire is successful and failed otherwise.
|
||||||
|
*
|
||||||
|
* <strong>Its important that an acquired is always released to the pool again, even if the {@link Channel}
|
||||||
|
* is explicitly closed..</strong>
|
||||||
*/
|
*/
|
||||||
Future<Channel> acquire();
|
Future<Channel> acquire();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Acquire a {@link Channel} from this {@link ChannelPool}. The given {@link Promise} is notified once
|
* Acquire a {@link Channel} from this {@link ChannelPool}. The given {@link Promise} is notified once
|
||||||
* the acquire is successful and failed otherwise.
|
* the acquire is successful and failed otherwise.
|
||||||
|
*
|
||||||
|
* <strong>Its important that an acquired is always released to the pool again, even if the {@link Channel}
|
||||||
|
* is explicitly closed..</strong>
|
||||||
*/
|
*/
|
||||||
Future<Channel> acquire(Promise<Channel> promise);
|
Future<Channel> acquire(Promise<Channel> promise);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user