remove() — netty Function Reference
Architecture documentation for the remove() function in ChannelOutboundBuffer.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 6dea3e34_a4b3_484d_ed24_d39287511a5a["remove()"] 509b1bc5_7cdc_9ee4_03d9_31eb2203d807["ChannelOutboundBuffer"] 6dea3e34_a4b3_484d_ed24_d39287511a5a -->|defined in| 509b1bc5_7cdc_9ee4_03d9_31eb2203d807 0ede732b_f018_f649_0cfa_0293b2b30200["removeBytes()"] 0ede732b_f018_f649_0cfa_0293b2b30200 -->|calls| 6dea3e34_a4b3_484d_ed24_d39287511a5a 99a6a55c_40f3_d958_c218_8834dd310e16["clearNioBuffers()"] 6dea3e34_a4b3_484d_ed24_d39287511a5a -->|calls| 99a6a55c_40f3_d958_c218_8834dd310e16 115bcbdc_e7fe_ba2c_e179_c7225d8ea4db["removeEntry()"] 6dea3e34_a4b3_484d_ed24_d39287511a5a -->|calls| 115bcbdc_e7fe_ba2c_e179_c7225d8ea4db 564b7e70_5bf4_8e5b_b980_3a9b8c917d0c["safeSuccess()"] 6dea3e34_a4b3_484d_ed24_d39287511a5a -->|calls| 564b7e70_5bf4_8e5b_b980_3a9b8c917d0c 9442861d_ae43_c572_95ea_8e92ddbb709f["decrementPendingOutboundBytes()"] 6dea3e34_a4b3_484d_ed24_d39287511a5a -->|calls| 9442861d_ae43_c572_95ea_8e92ddbb709f e4eb9088_d0fb_5c3e_c912_85c62a5fd0dc["unguardedRecycle()"] 6dea3e34_a4b3_484d_ed24_d39287511a5a -->|calls| e4eb9088_d0fb_5c3e_c912_85c62a5fd0dc cd969e8c_0b55_2177_ee6c_1c15a5b3292f["remove0()"] 6dea3e34_a4b3_484d_ed24_d39287511a5a -->|calls| cd969e8c_0b55_2177_ee6c_1c15a5b3292f style 6dea3e34_a4b3_484d_ed24_d39287511a5a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java lines 275–310
public boolean remove() {
Entry e = flushedEntry;
if (e == null) {
clearNioBuffers();
return false;
}
Object msg = e.msg;
ChannelPromise promise = e.promise;
int size = e.pendingSize;
removeEntry(e);
// only release message, notify and decrement if it was not canceled before.
if (!e.cancelled) {
// this save both checking against the ReferenceCounted interface
// and makes better use of virtual calls vs interface ones
if (msg instanceof AbstractReferenceCountedByteBuf) {
try {
// release now as it is flushed.
((AbstractReferenceCountedByteBuf) msg).release();
} catch (Throwable t) {
logger.warn("Failed to release a ByteBuf: {}", msg, t);
}
} else {
ReferenceCountUtil.safeRelease(msg);
}
safeSuccess(promise);
decrementPendingOutboundBytes(size, false, true);
}
// recycle the entry
e.unguardedRecycle();
return true;
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does remove() do?
remove() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java.
Where is remove() defined?
remove() is defined in transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java at line 275.
What does remove() call?
remove() calls 6 function(s): clearNioBuffers, decrementPendingOutboundBytes, remove0, removeEntry, safeSuccess, unguardedRecycle.
What calls remove()?
remove() is called by 1 function(s): removeBytes.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free