Home / Function/ writeOutList() — netty Function Reference

writeOutList() — netty Function Reference

Architecture documentation for the writeOutList() function in HttpObjectEncoder.java from the netty codebase.

Function java ProtocolCodecs HTTP calls 3 called by 1

Entity Profile

Dependency Diagram

graph TD
  b4ba8b14_3568_20d5_191d_ee233a07cd22["writeOutList()"]
  14c61705_9541_276a_37fa_eaab6f15ec5a["HttpObjectEncoder"]
  b4ba8b14_3568_20d5_191d_ee233a07cd22 -->|defined in| 14c61705_9541_276a_37fa_eaab6f15ec5a
  b0ddc820_c1a3_1132_127a_1624788c5f3b["write()"]
  b0ddc820_c1a3_1132_127a_1624788c5f3b -->|calls| b4ba8b14_3568_20d5_191d_ee233a07cd22
  b0ddc820_c1a3_1132_127a_1624788c5f3b["write()"]
  b4ba8b14_3568_20d5_191d_ee233a07cd22 -->|calls| b0ddc820_c1a3_1132_127a_1624788c5f3b
  cdec79dc_4162_729e_d4db_da5c3aef5e7e["writeVoidPromise()"]
  b4ba8b14_3568_20d5_191d_ee233a07cd22 -->|calls| cdec79dc_4162_729e_d4db_da5c3aef5e7e
  be9bcf8f_2c8f_3576_418f_ba8c48a90638["writePromiseCombiner()"]
  b4ba8b14_3568_20d5_191d_ee233a07cd22 -->|calls| be9bcf8f_2c8f_3576_418f_ba8c48a90638
  style b4ba8b14_3568_20d5_191d_ee233a07cd22 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectEncoder.java lines 122–139

    private static void writeOutList(ChannelHandlerContext ctx, List<Object> out, ChannelPromise promise) {
        final int size = out.size();
        try {
            if (size == 1) {
                ctx.write(out.get(0), promise);
            } else if (size > 1) {
                // Check if we can use a voidPromise for our extra writes to reduce GC-Pressure
                // See https://github.com/netty/netty/issues/2525
                if (promise == ctx.voidPromise()) {
                    writeVoidPromise(ctx, out);
                } else {
                    writePromiseCombiner(ctx, out, promise);
                }
            }
        } finally {
            out.clear();
        }
    }

Subdomains

Called By

Frequently Asked Questions

What does writeOutList() do?
writeOutList() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectEncoder.java.
Where is writeOutList() defined?
writeOutList() is defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectEncoder.java at line 122.
What does writeOutList() call?
writeOutList() calls 3 function(s): write, writePromiseCombiner, writeVoidPromise.
What calls writeOutList()?
writeOutList() 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