testRemoveAndWriteAllReentrantWrite() — netty Function Reference
Architecture documentation for the testRemoveAndWriteAllReentrantWrite() function in PendingWriteQueueTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 72b4c857_fb50_5de1_b53e_25cdc844e21a["testRemoveAndWriteAllReentrantWrite()"] b4bff24e_be13_7693_4ece_a0ed5ee1a982["PendingWriteQueueTest"] 72b4c857_fb50_5de1_b53e_25cdc844e21a -->|defined in| b4bff24e_be13_7693_4ece_a0ed5ee1a982 21f29e3d_6bf2_8663_b27c_0cf9f480f48f["EmbeddedChannel()"] 72b4c857_fb50_5de1_b53e_25cdc844e21a -->|calls| 21f29e3d_6bf2_8663_b27c_0cf9f480f48f c0e66cf8_7fea_5c09_425e_7b33398c45e6["write()"] 72b4c857_fb50_5de1_b53e_25cdc844e21a -->|calls| c0e66cf8_7fea_5c09_425e_7b33398c45e6 style 72b4c857_fb50_5de1_b53e_25cdc844e21a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/test/java/io/netty/channel/PendingWriteQueueTest.java lines 221–251
@Test
public void testRemoveAndWriteAllReentrantWrite() {
EmbeddedChannel channel = new EmbeddedChannel(new ChannelOutboundHandlerAdapter() {
@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) {
// Convert to writeAndFlush(...) so the promise will be notified by the transport.
ctx.writeAndFlush(msg, promise);
}
}, new ChannelOutboundHandlerAdapter());
final PendingWriteQueue queue = new PendingWriteQueue(channel.pipeline().lastContext());
ChannelPromise promise = channel.newPromise();
final ChannelPromise promise3 = channel.newPromise();
promise.addListener(future -> queue.add(3L, promise3));
queue.add(1L, promise);
ChannelPromise promise2 = channel.newPromise();
queue.add(2L, promise2);
queue.removeAndWriteAll();
assertTrue(promise.isDone());
assertTrue(promise.isSuccess());
assertTrue(promise2.isDone());
assertTrue(promise2.isSuccess());
assertTrue(promise3.isDone());
assertTrue(promise3.isSuccess());
assertTrue(channel.finish());
assertEquals(1L, (Long) channel.readOutbound());
assertEquals(2L, (Long) channel.readOutbound());
assertEquals(3L, (Long) channel.readOutbound());
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testRemoveAndWriteAllReentrantWrite() do?
testRemoveAndWriteAllReentrantWrite() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/PendingWriteQueueTest.java.
Where is testRemoveAndWriteAllReentrantWrite() defined?
testRemoveAndWriteAllReentrantWrite() is defined in transport/src/test/java/io/netty/channel/PendingWriteQueueTest.java at line 221.
What does testRemoveAndWriteAllReentrantWrite() call?
testRemoveAndWriteAllReentrantWrite() calls 2 function(s): EmbeddedChannel, write.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free