Home / Function/ remainingCapacity() — netty Function Reference

remainingCapacity() — netty Function Reference

Architecture documentation for the remainingCapacity() function in AdaptivePoolingAllocator.java from the netty codebase.

Function java Buffer Telemetry calls 3 called by 1

Entity Profile

Dependency Diagram

graph TD
  18f06c86_ea15_9251_9dc0_a0d73e197877["remainingCapacity()"]
  0786b48a_6931_326c_822b_73a96aca1827["SizeClassedChunk"]
  18f06c86_ea15_9251_9dc0_a0d73e197877 -->|defined in| 0786b48a_6931_326c_822b_73a96aca1827
  f2e9fb63_e8bd_a2ee_114d_d7571fd4ad46["remainingCapacity()"]
  f2e9fb63_e8bd_a2ee_114d_d7571fd4ad46 -->|calls| 18f06c86_ea15_9251_9dc0_a0d73e197877
  0e3b39fd_2e5c_a191_86b4_5e63a6cbaad0["remainingCapacityOnFreeList()"]
  18f06c86_ea15_9251_9dc0_a0d73e197877 -->|calls| 0e3b39fd_2e5c_a191_86b4_5e63a6cbaad0
  aa355cc9_0be7_7204_fd7f_51edca001d83["remainingCapacity()"]
  18f06c86_ea15_9251_9dc0_a0d73e197877 -->|calls| aa355cc9_0be7_7204_fd7f_51edca001d83
  0d87a4f6_817c_89dc_baee_630435215d14["capacity()"]
  18f06c86_ea15_9251_9dc0_a0d73e197877 -->|calls| 0d87a4f6_817c_89dc_baee_630435215d14
  style 18f06c86_ea15_9251_9dc0_a0d73e197877 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java lines 1324–1337

        @Override
        public int remainingCapacity() {
            int remainingCapacity = super.remainingCapacity();
            if (remainingCapacity > segmentSize) {
                return remainingCapacity;
            }
            int updatedRemainingCapacity = remainingCapacityOnFreeList();
            if (updatedRemainingCapacity == remainingCapacity) {
                return remainingCapacity;
            }
            // update allocatedBytes based on what's available in the free list
            allocatedBytes = capacity() - updatedRemainingCapacity;
            return updatedRemainingCapacity;
        }

Domain

Subdomains

Frequently Asked Questions

What does remainingCapacity() do?
remainingCapacity() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java.
Where is remainingCapacity() defined?
remainingCapacity() is defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java at line 1324.
What does remainingCapacity() call?
remainingCapacity() calls 3 function(s): capacity, remainingCapacity, remainingCapacityOnFreeList.
What calls remainingCapacity()?
remainingCapacity() is called by 1 function(s): remainingCapacity.

Analyze Your Own Codebase

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

Try Supermodel Free