Home / Class/ ArrayRedisMessage Class — netty Architecture

ArrayRedisMessage Class — netty Architecture

Architecture documentation for the ArrayRedisMessage class in ArrayRedisMessage.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  f5ca92f6_995a_36b7_7ac1_75f2f1b127c4["ArrayRedisMessage"]
  bec6a878_899a_d74c_e01d_a5252ab6262d["ArrayRedisMessage.java"]
  f5ca92f6_995a_36b7_7ac1_75f2f1b127c4 -->|defined in| bec6a878_899a_d74c_e01d_a5252ab6262d
  6b938256_521f_c148_8869_ec62a4270b99["ArrayRedisMessage()"]
  f5ca92f6_995a_36b7_7ac1_75f2f1b127c4 -->|method| 6b938256_521f_c148_8869_ec62a4270b99
  694cb873_5c25_83a2_63b0_4d4a10d56922["children()"]
  f5ca92f6_995a_36b7_7ac1_75f2f1b127c4 -->|method| 694cb873_5c25_83a2_63b0_4d4a10d56922
  a69f1124_9716_c730_efa5_14e465d6b931["isNull()"]
  f5ca92f6_995a_36b7_7ac1_75f2f1b127c4 -->|method| a69f1124_9716_c730_efa5_14e465d6b931
  7ead2451_b371_ef91_f0e5_b7a4f58d5ce3["deallocate()"]
  f5ca92f6_995a_36b7_7ac1_75f2f1b127c4 -->|method| 7ead2451_b371_ef91_f0e5_b7a4f58d5ce3
  f7242c8b_ea04_ac17_47ad_9b9427769d80["String()"]
  f5ca92f6_995a_36b7_7ac1_75f2f1b127c4 -->|method| f7242c8b_ea04_ac17_47ad_9b9427769d80

Relationship Graph

Source Code

codec-redis/src/main/java/io/netty/handler/codec/redis/ArrayRedisMessage.java lines 30–177

@UnstableApi
public class ArrayRedisMessage extends AbstractReferenceCounted implements RedisMessage {

    private final List<RedisMessage> children;

    private ArrayRedisMessage() {
        children = Collections.emptyList();
    }

    /**
     * Creates a {@link ArrayRedisMessage} for the given {@code content}.
     *
     * @param children the children.
     */
    public ArrayRedisMessage(List<RedisMessage> children) {
        // do not retain here. children are already retained when created.
        this.children = ObjectUtil.checkNotNull(children, "children");
    }

    /**
     * Get children of this Arrays. It can be null or empty.
     *
     * @return list of {@link RedisMessage}s.
     */
    public final List<RedisMessage> children() {
        return children;
    }

    /**
     * Returns whether the content of this message is {@code null}.
     *
     * @return indicates whether the content of this message is {@code null}.
     */
    public boolean isNull() {
        return false;
    }

    @Override
    protected void deallocate() {
        for (RedisMessage msg : children) {
            ReferenceCountUtil.release(msg);
        }
    }

    @Override
    public ArrayRedisMessage touch(Object hint) {
        for (RedisMessage msg : children) {
            ReferenceCountUtil.touch(msg);
        }
        return this;
    }

    @Override
    public String toString() {
        return new StringBuilder(StringUtil.simpleClassName(this))
                .append('[')
                .append("children=")
                .append(children.size())
                .append(']').toString();
    }

    /**
     * A predefined null array instance for {@link ArrayRedisMessage}.
     */
    public static final ArrayRedisMessage NULL_INSTANCE = new ArrayRedisMessage() {
        @Override
        public boolean isNull() {
            return true;
        }

        @Override
        public ArrayRedisMessage retain() {
            return this;
        }

        @Override
        public ArrayRedisMessage retain(int increment) {
            return this;
        }

        @Override

Frequently Asked Questions

What is the ArrayRedisMessage class?
ArrayRedisMessage is a class in the netty codebase, defined in codec-redis/src/main/java/io/netty/handler/codec/redis/ArrayRedisMessage.java.
Where is ArrayRedisMessage defined?
ArrayRedisMessage is defined in codec-redis/src/main/java/io/netty/handler/codec/redis/ArrayRedisMessage.java at line 30.

Analyze Your Own Codebase

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

Try Supermodel Free