Home / Function/ scheduleWriteSingle() — netty Function Reference

scheduleWriteSingle() — netty Function Reference

Architecture documentation for the scheduleWriteSingle() function in AbstractIoUringStreamChannel.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  5d8defc6_646e_bae7_319e_865c37d1c5ed["scheduleWriteSingle()"]
  2ef046a1_16aa_1708_4ba7_113c9fa2862e["IoUringStreamUnsafe"]
  5d8defc6_646e_bae7_319e_865c37d1c5ed -->|defined in| 2ef046a1_16aa_1708_4ba7_113c9fa2862e
  f79cc71e_f1c6_3e9c_e16e_f88b23e7f8ba["scheduleWriteMultiple()"]
  f79cc71e_f1c6_3e9c_e16e_f88b23e7f8ba -->|calls| 5d8defc6_646e_bae7_319e_865c37d1c5ed
  style 5d8defc6_646e_bae7_319e_865c37d1c5ed fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

        @Override
        protected int scheduleWriteSingle(Object msg) {
            assert writeId == 0;

            int fd = fd().intValue();
            IoRegistration registration = registration();
            final IoUringIoOps ops;
            if (msg instanceof IoUringFileRegion) {
                IoUringFileRegion fileRegion = (IoUringFileRegion) msg;
                try {
                    fileRegion.open();
                } catch (IOException e) {
                    this.handleWriteError(e);
                    return 0;
                }
                ops = fileRegion.splice(fd);
            } else {
                ByteBuf buf = (ByteBuf) msg;
                long address = IoUring.memoryAddress(buf) + buf.readerIndex();
                int length = buf.readableBytes();
                short opsid = nextOpsId();

                ops = IoUringIoOps.newSend(fd, (byte) 0, 0, address, length, opsid);
            }
            byte opCode = ops.opcode();
            writeId = registration.submit(ops);
            writeOpCode = opCode;
            if (writeId == 0) {
                return 0;
            }
            return 1;
        }

Domain

Subdomains

Frequently Asked Questions

What does scheduleWriteSingle() do?
scheduleWriteSingle() is a function in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringStreamChannel.java.
Where is scheduleWriteSingle() defined?
scheduleWriteSingle() is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringStreamChannel.java at line 272.
What calls scheduleWriteSingle()?
scheduleWriteSingle() is called by 1 function(s): scheduleWriteMultiple.

Analyze Your Own Codebase

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

Try Supermodel Free