Home / Function/ expandIndexedVariableTableAndSet() — netty Function Reference

expandIndexedVariableTableAndSet() — netty Function Reference

Architecture documentation for the expandIndexedVariableTableAndSet() function in InternalThreadLocalMap.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  d8ef2a02_3cc2_d96e_f67e_8d5fcf7daa0e["expandIndexedVariableTableAndSet()"]
  d6ca0ae0_1399_e584_fef6_bfc2f1e3e146["InternalThreadLocalMap"]
  d8ef2a02_3cc2_d96e_f67e_8d5fcf7daa0e -->|defined in| d6ca0ae0_1399_e584_fef6_bfc2f1e3e146
  093887ab_dbbd_baa1_daf6_43d6fe8f0fe3["Object()"]
  093887ab_dbbd_baa1_daf6_43d6fe8f0fe3 -->|calls| d8ef2a02_3cc2_d96e_f67e_8d5fcf7daa0e
  style d8ef2a02_3cc2_d96e_f67e_8d5fcf7daa0e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/main/java/io/netty/util/internal/InternalThreadLocalMap.java lines 343–363

    private void expandIndexedVariableTableAndSet(int index, Object value) {
        Object[] oldArray = indexedVariables;
        final int oldCapacity = oldArray.length;
        int newCapacity;
        if (index < ARRAY_LIST_CAPACITY_EXPAND_THRESHOLD) {
            newCapacity = index;
            newCapacity |= newCapacity >>>  1;
            newCapacity |= newCapacity >>>  2;
            newCapacity |= newCapacity >>>  4;
            newCapacity |= newCapacity >>>  8;
            newCapacity |= newCapacity >>> 16;
            newCapacity ++;
        } else {
            newCapacity = ARRAY_LIST_CAPACITY_MAX_SIZE;
        }

        Object[] newArray = Arrays.copyOf(oldArray, newCapacity);
        Arrays.fill(newArray, oldCapacity, newArray.length, UNSET);
        newArray[index] = value;
        indexedVariables = newArray;
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does expandIndexedVariableTableAndSet() do?
expandIndexedVariableTableAndSet() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/internal/InternalThreadLocalMap.java.
Where is expandIndexedVariableTableAndSet() defined?
expandIndexedVariableTableAndSet() is defined in common/src/main/java/io/netty/util/internal/InternalThreadLocalMap.java at line 343.
What calls expandIndexedVariableTableAndSet()?
expandIndexedVariableTableAndSet() is called by 1 function(s): Object.

Analyze Your Own Codebase

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

Try Supermodel Free