transferToNextInLineOrRelease() — netty Function Reference
Architecture documentation for the transferToNextInLineOrRelease() function in AdaptivePoolingAllocator.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 33bb02aa_95f4_9821_7021_dcda1b551bd1["transferToNextInLineOrRelease()"] 03ccb368_d6fc_bee6_64d5_0e674ae8c01f["Magazine"] 33bb02aa_95f4_9821_7021_dcda1b551bd1 -->|defined in| 03ccb368_d6fc_bee6_64d5_0e674ae8c01f 2845f5ec_6a60_22de_f8d4_345bc5446f42["allocateWithoutLock()"] 2845f5ec_6a60_22de_f8d4_345bc5446f42 -->|calls| 33bb02aa_95f4_9821_7021_dcda1b551bd1 b550a3a7_b98a_e36b_d58d_413aa6587ed4["allocate()"] b550a3a7_b98a_e36b_d58d_413aa6587ed4 -->|calls| 33bb02aa_95f4_9821_7021_dcda1b551bd1 f4981826_99f5_bf62_b6e7_eb825c46476a["releaseFromMagazine()"] 33bb02aa_95f4_9821_7021_dcda1b551bd1 -->|calls| f4981826_99f5_bf62_b6e7_eb825c46476a 59c1d0ae_e507_0c96_51fa_359fe1b6411f["release()"] 33bb02aa_95f4_9821_7021_dcda1b551bd1 -->|calls| 59c1d0ae_e507_0c96_51fa_359fe1b6411f aa355cc9_0be7_7204_fd7f_51edca001d83["remainingCapacity()"] 33bb02aa_95f4_9821_7021_dcda1b551bd1 -->|calls| aa355cc9_0be7_7204_fd7f_51edca001d83 style 33bb02aa_95f4_9821_7021_dcda1b551bd1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java lines 1005–1023
private void transferToNextInLineOrRelease(Chunk chunk) {
if (NEXT_IN_LINE.compareAndSet(this, null, chunk)) {
return;
}
Chunk nextChunk = NEXT_IN_LINE.get(this);
if (nextChunk != null && nextChunk != MAGAZINE_FREED
&& chunk.remainingCapacity() > nextChunk.remainingCapacity()) {
if (NEXT_IN_LINE.compareAndSet(this, nextChunk, chunk)) {
nextChunk.releaseFromMagazine();
return;
}
}
// Next-in-line is occupied. We don't try to add it to the central queue yet as it might still be used
// by some buffers and so is attached to a Magazine.
// Once a Chunk is completely released by Chunk.release() it will try to move itself to the queue
// as last resort.
chunk.releaseFromMagazine();
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does transferToNextInLineOrRelease() do?
transferToNextInLineOrRelease() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java.
Where is transferToNextInLineOrRelease() defined?
transferToNextInLineOrRelease() is defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java at line 1005.
What does transferToNextInLineOrRelease() call?
transferToNextInLineOrRelease() calls 3 function(s): release, releaseFromMagazine, remainingCapacity.
What calls transferToNextInLineOrRelease()?
transferToNextInLineOrRelease() is called by 2 function(s): allocate, allocateWithoutLock.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free