removeAndFailAll() — netty Function Reference
Architecture documentation for the removeAndFailAll() function in PendingWriteQueue.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 9465da28_383b_e0f3_4e91_d1dcedaa5bdf["removeAndFailAll()"] 83722386_341f_50b9_cd3a_d141138801ae["PendingWriteQueue"] 9465da28_383b_e0f3_4e91_d1dcedaa5bdf -->|defined in| 83722386_341f_50b9_cd3a_d141138801ae 46561650_a7c0_09b3_f8da_a4d1c4544d81["size()"] 46561650_a7c0_09b3_f8da_a4d1c4544d81 -->|calls| 9465da28_383b_e0f3_4e91_d1dcedaa5bdf 9045a57d_5230_2357_4ef7_f61e7cee74ba["add()"] 9045a57d_5230_2357_4ef7_f61e7cee74ba -->|calls| 9465da28_383b_e0f3_4e91_d1dcedaa5bdf a93247f6_033b_6516_d4f0_786bf935f89e["safeFail()"] 9465da28_383b_e0f3_4e91_d1dcedaa5bdf -->|calls| a93247f6_033b_6516_d4f0_786bf935f89e 2c764cb5_1103_a5d1_4774_278972921504["assertEmpty()"] 9465da28_383b_e0f3_4e91_d1dcedaa5bdf -->|calls| 2c764cb5_1103_a5d1_4774_278972921504 d80642d8_7dc6_939b_e48a_94fa31dc8c25["recycle()"] 9465da28_383b_e0f3_4e91_d1dcedaa5bdf -->|calls| d80642d8_7dc6_939b_e48a_94fa31dc8c25 style 9465da28_383b_e0f3_4e91_d1dcedaa5bdf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/PendingWriteQueue.java lines 182–201
public void removeAndFailAll(Throwable cause) {
assert executor.inEventLoop();
ObjectUtil.checkNotNull(cause, "cause");
// It is possible for some of the failed promises to trigger more writes. The new writes
// will "revive" the queue, so we need to clean them up until the queue is empty.
for (PendingWrite write = head; write != null; write = head) {
head = tail = null;
size = 0;
bytes = 0;
while (write != null) {
PendingWrite next = write.next;
ReferenceCountUtil.safeRelease(write.msg);
ChannelPromise promise = write.promise;
recycle(write, false);
safeFail(promise, cause);
write = next;
}
}
assertEmpty();
}
Domain
Subdomains
Source
Frequently Asked Questions
What does removeAndFailAll() do?
removeAndFailAll() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/PendingWriteQueue.java.
Where is removeAndFailAll() defined?
removeAndFailAll() is defined in transport/src/main/java/io/netty/channel/PendingWriteQueue.java at line 182.
What does removeAndFailAll() call?
removeAndFailAll() calls 3 function(s): assertEmpty, recycle, safeFail.
What calls removeAndFailAll()?
removeAndFailAll() is called by 2 function(s): add, size.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free