Home / Function/ testNumThreadCachesWithNoDirectArenas() — netty Function Reference

testNumThreadCachesWithNoDirectArenas() — netty Function Reference

Architecture documentation for the testNumThreadCachesWithNoDirectArenas() function in PooledByteBufAllocatorTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  de494399_c981_c4b3_1fce_b1d8ca781aa4["testNumThreadCachesWithNoDirectArenas()"]
  f8855572_2abf_1bf6_a32b_5cf6d1cf4947["PooledByteBufAllocatorTest"]
  de494399_c981_c4b3_1fce_b1d8ca781aa4 -->|defined in| f8855572_2abf_1bf6_a32b_5cf6d1cf4947
  4e681469_9c14_67cb_5890_46b5d4b12dd2["PooledByteBufAllocator()"]
  de494399_c981_c4b3_1fce_b1d8ca781aa4 -->|calls| 4e681469_9c14_67cb_5890_46b5d4b12dd2
  style de494399_c981_c4b3_1fce_b1d8ca781aa4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/PooledByteBufAllocatorTest.java lines 426–444

    @Test
    @Timeout(value = 3000, unit = MILLISECONDS)
    public void testNumThreadCachesWithNoDirectArenas() throws InterruptedException {
        int numHeapArenas = 1;
        final PooledByteBufAllocator allocator =
            new PooledByteBufAllocator(numHeapArenas, 0, 8192, 1);

        ThreadCache tcache0 = createNewThreadCache(allocator, false);
        assertEquals(1, allocator.metric().numThreadLocalCaches());

        ThreadCache tcache1 = createNewThreadCache(allocator, false);
        assertEquals(2, allocator.metric().numThreadLocalCaches());

        tcache0.destroy();
        assertEquals(1, allocator.metric().numThreadLocalCaches());

        tcache1.destroy();
        assertEquals(0, allocator.metric().numThreadLocalCaches());
    }

Domain

Subdomains

Frequently Asked Questions

What does testNumThreadCachesWithNoDirectArenas() do?
testNumThreadCachesWithNoDirectArenas() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/PooledByteBufAllocatorTest.java.
Where is testNumThreadCachesWithNoDirectArenas() defined?
testNumThreadCachesWithNoDirectArenas() is defined in buffer/src/test/java/io/netty/buffer/PooledByteBufAllocatorTest.java at line 426.
What does testNumThreadCachesWithNoDirectArenas() call?
testNumThreadCachesWithNoDirectArenas() calls 1 function(s): PooledByteBufAllocator.

Analyze Your Own Codebase

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

Try Supermodel Free