Home / Function/ write() — netty Function Reference

write() — netty Function Reference

Architecture documentation for the write() function in LocalTransportThreadModelTest.java from the netty codebase.

Function java Buffer Telemetry calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  9027c75a_851a_b1c4_43a2_4391857f5910["write()"]
  5541dc33_efde_3aa6_67b2_db159b8c2440["MessageForwarder1"]
  9027c75a_851a_b1c4_43a2_4391857f5910 -->|defined in| 5541dc33_efde_3aa6_67b2_db159b8c2440
  b71fa464_aa34_c554_4b9a_ed67afd8bdcf["write()"]
  b71fa464_aa34_c554_4b9a_ed67afd8bdcf -->|calls| 9027c75a_851a_b1c4_43a2_4391857f5910
  b71fa464_aa34_c554_4b9a_ed67afd8bdcf["write()"]
  9027c75a_851a_b1c4_43a2_4391857f5910 -->|calls| b71fa464_aa34_c554_4b9a_ed67afd8bdcf
  style 9027c75a_851a_b1c4_43a2_4391857f5910 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/local/LocalTransportThreadModelTest.java lines 441–460

        @Override
        public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
            assertSame(t, Thread.currentThread());

            // Don't let the write request go to the server-side channel - just swallow.
            boolean swallow = this == ctx.pipeline().first();

            ByteBuf m = (ByteBuf) msg;
            int count = m.readableBytes() / 4;
            for (int j = 0; j < count; j ++) {
                int actual = m.readInt();
                int expected = outCnt ++;
                assertEquals(expected, actual);
                if (!swallow) {
                    ctx.write(actual);
                }
            }
            ctx.writeAndFlush(Unpooled.EMPTY_BUFFER, promise);
            m.release();
        }

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does write() do?
write() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/local/LocalTransportThreadModelTest.java.
Where is write() defined?
write() is defined in transport/src/test/java/io/netty/channel/local/LocalTransportThreadModelTest.java at line 441.
What does write() call?
write() calls 1 function(s): write.
What calls write()?
write() is called by 1 function(s): write.

Analyze Your Own Codebase

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

Try Supermodel Free