Home / Function/ init() — netty Function Reference

init() — netty Function Reference

Architecture documentation for the init() function in DefaultAttributeMapBenchmark.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  fe68cde0_48d9_20d3_1a4c_d46e4e0c2944["init()"]
  4d58d226_11dd_ffeb_a5a9_d53d9ae0abd8["DefaultAttributeMapBenchmark"]
  fe68cde0_48d9_20d3_1a4c_d46e4e0c2944 -->|defined in| 4d58d226_11dd_ffeb_a5a9_d53d9ae0abd8
  style fe68cde0_48d9_20d3_1a4c_d46e4e0c2944 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

microbench/src/main/java/io/netty/util/DefaultAttributeMapBenchmark.java lines 58–72

    @Setup
    public void init() {
        if (Integer.bitCount(keyCount) != 1) {
            throw new AssertionError("keyCount should cbe a power of 2");
        }
        attributes = new DefaultAttributeMap();
        keys = new AttributeKey[keyCount];
        identityHashMap = new IdentityHashMap<AttributeKey<Integer>, Attribute<Integer>>(keyCount);
        for (int i = 0; i < keyCount; i++) {
            final AttributeKey<Integer> key = AttributeKey.valueOf(Integer.toString(i));
            keys[i] = key;
            final Attribute<Integer> attribute = attributes.attr(key);
            identityHashMap.put(key, attribute);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does init() do?
init() is a function in the netty codebase, defined in microbench/src/main/java/io/netty/util/DefaultAttributeMapBenchmark.java.
Where is init() defined?
init() is defined in microbench/src/main/java/io/netty/util/DefaultAttributeMapBenchmark.java at line 58.

Analyze Your Own Codebase

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

Try Supermodel Free