Home / Class/ WriteProcessor Class — netty Architecture

WriteProcessor Class — netty Architecture

Architecture documentation for the WriteProcessor class in IoUringDatagramChannel.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  cc08a497_db58_851e_a0b5_76acaa074811["WriteProcessor"]
  84d8ef59_34c3_a366_2f8b_b5fcde9ce2c0["IoUringDatagramChannel.java"]
  cc08a497_db58_851e_a0b5_76acaa074811 -->|defined in| 84d8ef59_34c3_a366_2f8b_b5fcde9ce2c0
  4b133b67_3add_9c1f_50c0_b0fa9893aa76["processMessage()"]
  cc08a497_db58_851e_a0b5_76acaa074811 -->|method| 4b133b67_3add_9c1f_50c0_b0fa9893aa76
  097728f8_c4ad_7660_7795_f0dab4eb6935["write()"]
  cc08a497_db58_851e_a0b5_76acaa074811 -->|method| 097728f8_c4ad_7660_7795_f0dab4eb6935

Relationship Graph

Source Code

transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringDatagramChannel.java lines 382–403

        private final class WriteProcessor implements ChannelOutboundBuffer.MessageProcessor {
            private int written;
            @Override
            public boolean processMessage(Object msg) {
                if (scheduleWrite(msg, written == 0)) {
                    written++;
                    return true;
                }
                return false;
            }

            int write(ChannelOutboundBuffer in) {
                written = 0;
                try {
                    in.forEachFlushedMessage(this);
                } catch (Exception e) {
                    // This should never happen as our processMessage(...) never throws.
                    throw new IllegalStateException(e);
                }
                return written;
            }
        }

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free