Home / Function/ U() — netty Function Reference

U() — netty Function Reference

Architecture documentation for the U() function in AbstractPooledDerivedByteBuf.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  3c5ed547_bedb_946f_4195_5c59f61fbaa2["U()"]
  71f0dee8_a776_7a4e_70f9_33ece338c7c8["AbstractPooledDerivedByteBuf"]
  3c5ed547_bedb_946f_4195_5c59f61fbaa2 -->|defined in| 71f0dee8_a776_7a4e_70f9_33ece338c7c8
  style 3c5ed547_bedb_946f_4195_5c59f61fbaa2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/AbstractPooledDerivedByteBuf.java lines 62–83

    final <U extends AbstractPooledDerivedByteBuf> U init(
            AbstractByteBuf unwrapped, ByteBuf wrapped, int readerIndex, int writerIndex, int maxCapacity) {
        wrapped.retain(); // Retain up front to ensure the parent is accessible before doing more work.
        parent = wrapped;
        rootParent = unwrapped;

        try {
            maxCapacity(maxCapacity);
            setIndex0(readerIndex, writerIndex); // It is assumed the bounds checking is done by the caller.
            resetRefCnt();

            @SuppressWarnings("unchecked")
            final U castThis = (U) this;
            wrapped = null;
            return castThis;
        } finally {
            if (wrapped != null) {
                parent = rootParent = null;
                wrapped.release();
            }
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does U() do?
U() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/AbstractPooledDerivedByteBuf.java.
Where is U() defined?
U() is defined in buffer/src/main/java/io/netty/buffer/AbstractPooledDerivedByteBuf.java at line 62.

Analyze Your Own Codebase

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

Try Supermodel Free