Home / Class/ AbstractIoUringStreamChannel Class — netty Architecture

AbstractIoUringStreamChannel Class — netty Architecture

Architecture documentation for the AbstractIoUringStreamChannel class in AbstractIoUringStreamChannel.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b["AbstractIoUringStreamChannel"]
  73a81342_a975_761a_6c8b_73ab452505f8["AbstractIoUringStreamChannel.java"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|defined in| 73a81342_a975_761a_6c8b_73ab452505f8
  d7a0f77c_76b1_ce15_06e5_82cfee5c5649["AbstractIoUringStreamChannel()"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|method| d7a0f77c_76b1_ce15_06e5_82cfee5c5649
  b2d3c353_cbcd_1286_961e_0d890bec5d09["ChannelMetadata()"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|method| b2d3c353_cbcd_1286_961e_0d890bec5d09
  d0fa27f0_c8df_26b4_0418_0059a810db9e["AbstractUringUnsafe()"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|method| d0fa27f0_c8df_26b4_0418_0059a810db9e
  8da473da_eef9_89a8_c578_c4589756d46d["ChannelFuture()"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|method| 8da473da_eef9_89a8_c578_c4589756d46d
  ffb48ebf_6c8f_1105_d91b_7858cd28d584["doShutdownOutput()"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|method| ffb48ebf_6c8f_1105_d91b_7858cd28d584
  afa2a64f_bce2_9d2e_e215_d073c187a276["shutdownInput0()"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|method| afa2a64f_bce2_9d2e_e215_d073c187a276
  bd70f127_bbe6_cd65_0b32_bd33bbd1212e["isOutputShutdown()"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|method| bd70f127_bbe6_cd65_0b32_bd33bbd1212e
  f7273ffc_f3e5_ea31_e24e_ecf0b71d4d7a["isInputShutdown()"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|method| f7273ffc_f3e5_ea31_e24e_ecf0b71d4d7a
  ff1e614f_e8f6_5695_d719_c1a5f6929414["isShutdown()"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|method| ff1e614f_e8f6_5695_d719_c1a5f6929414
  6a9d5e46_a01c_522f_5c3b_4688247e1f1d["shutdownOutputDone()"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|method| 6a9d5e46_a01c_522f_5c3b_4688247e1f1d
  a885e83c_6a8f_6223_32e4_813fddbf1b00["shutdownDone()"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|method| a885e83c_6a8f_6223_32e4_813fddbf1b00
  cf970da1_be45_e1cb_f437_21c8ac6cefba["doRegister()"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|method| cf970da1_be45_e1cb_f437_21c8ac6cefba
  0174eb86_01a4_e07f_910b_7a741c46fd2d["Object()"]
  e0084bc2_202c_2cf9_b167_f5ee8ec96f9b -->|method| 0174eb86_01a4_e07f_910b_7a741c46fd2d

Relationship Graph

Source Code

transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringStreamChannel.java lines 39–659

abstract class AbstractIoUringStreamChannel extends AbstractIoUringChannel implements DuplexChannel {
    private static final InternalLogger logger = InternalLoggerFactory.getInstance(AbstractIoUringStreamChannel.class);
    private static final ChannelMetadata METADATA = new ChannelMetadata(false, 16);

    // Store the opCode so we know if we used WRITE or WRITEV.
    byte writeOpCode;
    // Keep track of the ids used for write and read so we can cancel these when needed.
    long writeId;
    byte readOpCode;
    long readId;

    // The configured buffer ring if any
    private IoUringBufferRing bufferRing;

    AbstractIoUringStreamChannel(Channel parent, LinuxSocket socket, boolean active) {
        super(parent, socket, active);
    }

    AbstractIoUringStreamChannel(Channel parent, LinuxSocket socket, SocketAddress remote) {
        super(parent, socket, remote);
    }

    @Override
    public ChannelMetadata metadata() {
        return METADATA;
    }

    @Override
    protected AbstractUringUnsafe newUnsafe() {
        return new IoUringStreamUnsafe();
    }

    @Override
    public final ChannelFuture shutdown() {
        return shutdown(newPromise());
    }

    @Override
    public final ChannelFuture shutdown(final ChannelPromise promise) {
        ChannelFuture shutdownOutputFuture = shutdownOutput();
        if (shutdownOutputFuture.isDone()) {
            shutdownOutputDone(shutdownOutputFuture, promise);
        } else {
            shutdownOutputFuture.addListener(new ChannelFutureListener() {
                @Override
                public void operationComplete(final ChannelFuture shutdownOutputFuture) throws Exception {
                    shutdownOutputDone(shutdownOutputFuture, promise);
                }
            });
        }
        return promise;
    }

    @Override
    protected final void doShutdownOutput() throws Exception {
        socket.shutdown(false, true);
    }

    private void shutdownInput0(final ChannelPromise promise) {
        try {
            socket.shutdown(true, false);
            promise.setSuccess();
        } catch (Throwable cause) {
            promise.setFailure(cause);
        }
    }

    @Override
    public final boolean isOutputShutdown() {
        return socket.isOutputShutdown();
    }

    @Override
    public final boolean isInputShutdown() {
        return socket.isInputShutdown();
    }

    @Override
    public final boolean isShutdown() {
        return socket.isShutdown();
    }

Frequently Asked Questions

What is the AbstractIoUringStreamChannel class?
AbstractIoUringStreamChannel is a class in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringStreamChannel.java.
Where is AbstractIoUringStreamChannel defined?
AbstractIoUringStreamChannel is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringStreamChannel.java at line 39.

Analyze Your Own Codebase

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

Try Supermodel Free