Home / Type/ ChannelPool Type — netty Architecture

ChannelPool Type — netty Architecture

Architecture documentation for the ChannelPool type/interface in ChannelPool.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  ea99e7e6_b7e2_816e_3b30_c12893e23653["ChannelPool"]
  be41e206_9a00_f9b3_bf8b_9153d420e1d8["ChannelPool.java"]
  ea99e7e6_b7e2_816e_3b30_c12893e23653 -->|defined in| be41e206_9a00_f9b3_bf8b_9153d420e1d8
  style ea99e7e6_b7e2_816e_3b30_c12893e23653 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/pool/ChannelPool.java lines 27–61

public interface ChannelPool extends Closeable {

    /**
     * Acquire a {@link Channel} from this {@link ChannelPool}. The returned {@link Future} is notified once
     * 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();

    /**
     * Acquire a {@link Channel} from this {@link ChannelPool}. The given {@link Promise} is notified once
     * 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);

    /**
     * Release a {@link Channel} back to this {@link ChannelPool}. The returned {@link Future} is notified once
     * the release is successful and failed otherwise. When failed the {@link Channel} will automatically closed.
     */
    Future<Void> release(Channel channel);

    /**
     * Release a {@link Channel} back to this {@link ChannelPool}. The given {@link Promise} is notified once
     * the release is successful and failed otherwise. When failed the {@link Channel} will automatically closed.
     */
    Future<Void> release(Channel channel, Promise<Void> promise);

    @Override
    void close();
}

Frequently Asked Questions

What is the ChannelPool type?
ChannelPool is a type/interface in the netty codebase, defined in transport/src/main/java/io/netty/channel/pool/ChannelPool.java.
Where is ChannelPool defined?
ChannelPool is defined in transport/src/main/java/io/netty/channel/pool/ChannelPool.java at line 27.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free