attemptCopyToCumulation() — netty Function Reference
Architecture documentation for the attemptCopyToCumulation() function in SslHandlerCoalescingBufferQueue.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 434aea79_d1fd_2294_f710_61b9ad4f9245["attemptCopyToCumulation()"] 0aa60ec9_89c3_e36b_309b_e98e165de0ee["SslHandlerCoalescingBufferQueue"] 434aea79_d1fd_2294_f710_61b9ad4f9245 -->|defined in| 0aa60ec9_89c3_e36b_309b_e98e165de0ee 1dcb9da8_a682_a2a6_431c_dc8d6b126e8a["ByteBuf()"] 1dcb9da8_a682_a2a6_431c_dc8d6b126e8a -->|calls| 434aea79_d1fd_2294_f710_61b9ad4f9245 style 434aea79_d1fd_2294_f710_61b9ad4f9245 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/SslHandlerCoalescingBufferQueue.java lines 73–93
private static boolean attemptCopyToCumulation(ByteBuf cumulation, ByteBuf next, int wrapDataSize) {
final int inReadableBytes = next.readableBytes();
// Nothing to copy so just release the buffer.
if (inReadableBytes == 0) {
next.release();
return true;
}
final int cumulationCapacity = cumulation.capacity();
if (wrapDataSize - cumulation.readableBytes() >= inReadableBytes &&
// Avoid using the same buffer if next's data would make cumulation exceed the wrapDataSize.
// Only copy if there is enough space available and the capacity is large enough, and attempt to
// resize if the capacity is small.
(cumulation.isWritable(inReadableBytes) && cumulationCapacity >= wrapDataSize ||
cumulationCapacity < wrapDataSize &&
ensureWritableSuccess(cumulation.ensureWritable(inReadableBytes, false)))) {
cumulation.writeBytes(next);
next.release();
return true;
}
return false;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does attemptCopyToCumulation() do?
attemptCopyToCumulation() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/SslHandlerCoalescingBufferQueue.java.
Where is attemptCopyToCumulation() defined?
attemptCopyToCumulation() is defined in handler/src/main/java/io/netty/handler/ssl/SslHandlerCoalescingBufferQueue.java at line 73.
What calls attemptCopyToCumulation()?
attemptCopyToCumulation() is called by 1 function(s): ByteBuf.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free