Home / Function/ writeFullBulkStringMessage() — netty Function Reference

writeFullBulkStringMessage() — netty Function Reference

Architecture documentation for the writeFullBulkStringMessage() function in RedisEncoder.java from the netty codebase.

Function java Buffer Allocators calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  a4e8ec4f_e4ac_aefb_fc36_65a227b73a02["writeFullBulkStringMessage()"]
  917d8b11_c533_469c_d2a7_d3500be572e6["RedisEncoder"]
  a4e8ec4f_e4ac_aefb_fc36_65a227b73a02 -->|defined in| 917d8b11_c533_469c_d2a7_d3500be572e6
  709fcc53_354a_bc98_e002_ecd01cc6fa7a["writeRedisMessage()"]
  709fcc53_354a_bc98_e002_ecd01cc6fa7a -->|calls| a4e8ec4f_e4ac_aefb_fc36_65a227b73a02
  4308e55a_fc15_567e_5abb_10a28747293f["numberToBytes()"]
  a4e8ec4f_e4ac_aefb_fc36_65a227b73a02 -->|calls| 4308e55a_fc15_567e_5abb_10a28747293f
  style a4e8ec4f_e4ac_aefb_fc36_65a227b73a02 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-redis/src/main/java/io/netty/handler/codec/redis/RedisEncoder.java lines 144–163

    private void writeFullBulkStringMessage(ByteBufAllocator allocator, FullBulkStringRedisMessage msg,
                                            List<Object> out) {
        if (msg.isNull()) {
            ByteBuf buf = allocator.ioBuffer(RedisConstants.TYPE_LENGTH + RedisConstants.NULL_LENGTH +
                                             RedisConstants.EOL_LENGTH);
            RedisMessageType.BULK_STRING.writeTo(buf);
            buf.writeShort(RedisConstants.NULL_SHORT);
            buf.writeShort(RedisConstants.EOL_SHORT);
            out.add(buf);
        } else {
            ByteBuf headerBuf = allocator.ioBuffer(RedisConstants.TYPE_LENGTH + RedisConstants.LONG_MAX_LENGTH +
                                                   RedisConstants.EOL_LENGTH);
            RedisMessageType.BULK_STRING.writeTo(headerBuf);
            headerBuf.writeBytes(numberToBytes(msg.content().readableBytes()));
            headerBuf.writeShort(RedisConstants.EOL_SHORT);
            out.add(headerBuf);
            out.add(msg.content().retain());
            out.add(allocator.ioBuffer(RedisConstants.EOL_LENGTH).writeShort(RedisConstants.EOL_SHORT));
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does writeFullBulkStringMessage() do?
writeFullBulkStringMessage() is a function in the netty codebase, defined in codec-redis/src/main/java/io/netty/handler/codec/redis/RedisEncoder.java.
Where is writeFullBulkStringMessage() defined?
writeFullBulkStringMessage() is defined in codec-redis/src/main/java/io/netty/handler/codec/redis/RedisEncoder.java at line 144.
What does writeFullBulkStringMessage() call?
writeFullBulkStringMessage() calls 1 function(s): numberToBytes.
What calls writeFullBulkStringMessage()?
writeFullBulkStringMessage() is called by 1 function(s): writeRedisMessage.

Analyze Your Own Codebase

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

Try Supermodel Free