Home / Class/ Iov Class — netty Architecture

Iov Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  161f2bdb_4389_f834_83e1_58a1c10b9212["Iov"]
  85f72997_dd11_db52_658d_88e46ed613a4["Iov.java"]
  161f2bdb_4389_f834_83e1_58a1c10b9212 -->|defined in| 85f72997_dd11_db52_658d_88e46ed613a4
  d77eb88a_eaff_9cf1_ab75_075ecf8c6b3e["Iov()"]
  161f2bdb_4389_f834_83e1_58a1c10b9212 -->|method| d77eb88a_eaff_9cf1_ab75_075ecf8c6b3e
  9c8c5fc1_edf5_bc5e_82c1_b375840d34dc["set()"]
  161f2bdb_4389_f834_83e1_58a1c10b9212 -->|method| 9c8c5fc1_edf5_bc5e_82c1_b375840d34dc
  126da524_2c41_1284_afeb_bf3d64407712["getBufferAddress()"]
  161f2bdb_4389_f834_83e1_58a1c10b9212 -->|method| 126da524_2c41_1284_afeb_bf3d64407712
  97abfd4a_246c_ab55_73f7_a35bff7cbad5["getBufferLength()"]
  161f2bdb_4389_f834_83e1_58a1c10b9212 -->|method| 97abfd4a_246c_ab55_73f7_a35bff7cbad5

Relationship Graph

Source Code

transport-classes-io_uring/src/main/java/io/netty/channel/uring/Iov.java lines 28–59

final class Iov {

    private Iov() { }

    static void set(ByteBuffer buffer, long bufferAddress, int length) {
        int position = buffer.position();
        if (Native.SIZEOF_SIZE_T == 4) {
            buffer.putInt(position + Native.IOVEC_OFFSETOF_IOV_BASE, (int) bufferAddress);
            buffer.putInt(position + Native.IOVEC_OFFSETOF_IOV_LEN, length);
        } else {
            assert Native.SIZEOF_SIZE_T == 8;
            buffer.putLong(position + Native.IOVEC_OFFSETOF_IOV_BASE, bufferAddress);
            buffer.putLong(position + Native.IOVEC_OFFSETOF_IOV_LEN, length);
        }
    }

    static long getBufferAddress(ByteBuffer iov) {
        if (Native.SIZEOF_SIZE_T == 4) {
            return iov.getInt(iov.position() + Native.IOVEC_OFFSETOF_IOV_BASE);
        }
        assert Native.SIZEOF_SIZE_T == 8;
        return iov.getLong(iov.position() + Native.IOVEC_OFFSETOF_IOV_BASE);
    }

    static int getBufferLength(ByteBuffer iov) {
        if (Native.SIZEOF_SIZE_T == 4) {
            return iov.getInt(iov.position() + Native.IOVEC_OFFSETOF_IOV_LEN);
        }
        assert Native.SIZEOF_SIZE_T == 8;
        return (int) iov.getLong(iov.position() + Native.IOVEC_OFFSETOF_IOV_LEN);
    }
}

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free