shouldDecodeSeparatedValues() — netty Function Reference
Architecture documentation for the shouldDecodeSeparatedValues() function in BinaryMemcacheDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 87bc1987_2aff_9766_072f_43193fb410d1["shouldDecodeSeparatedValues()"] 842bad71_a9e0_a6bb_4ffc_95b572e61d71["BinaryMemcacheDecoderTest"] 87bc1987_2aff_9766_072f_43193fb410d1 -->|defined in| 842bad71_a9e0_a6bb_4ffc_95b572e61d71 style 87bc1987_2aff_9766_072f_43193fb410d1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-memcache/src/test/java/io/netty/handler/codec/memcache/binary/BinaryMemcacheDecoderTest.java lines 203–252
@Test
public void shouldDecodeSeparatedValues() {
String msgBody = "Not found";
channel = new EmbeddedChannel(new BinaryMemcacheResponseDecoder());
channel.writeInbound(Unpooled.buffer().writeBytes(GET_RESPONSE_CHUNK_1));
channel.writeInbound(Unpooled.buffer().writeBytes(GET_RESPONSE_CHUNK_2));
// First message
BinaryMemcacheResponse response = channel.readInbound();
assertEquals(BinaryMemcacheResponseStatus.KEY_ENOENT, response.status());
assertEquals(msgBody.length(), response.totalBodyLength());
response.release();
// First message first content chunk
MemcacheContent content = channel.readInbound();
assertInstanceOf(LastMemcacheContent.class, content);
assertEquals(msgBody, content.content().toString(CharsetUtil.UTF_8));
content.release();
// Second message
response = channel.readInbound();
assertEquals(BinaryMemcacheResponseStatus.KEY_ENOENT, response.status());
assertEquals(msgBody.length(), response.totalBodyLength());
response.release();
// Second message first content chunk
content = channel.readInbound();
assertInstanceOf(MemcacheContent.class, content);
assertEquals(msgBody.substring(0, 7), content.content().toString(CharsetUtil.UTF_8));
content.release();
// Second message second content chunk
content = channel.readInbound();
assertInstanceOf(LastMemcacheContent.class, content);
assertEquals(msgBody.substring(7, 9), content.content().toString(CharsetUtil.UTF_8));
content.release();
// Third message
response = channel.readInbound();
assertEquals(BinaryMemcacheResponseStatus.KEY_ENOENT, response.status());
assertEquals(msgBody.length(), response.totalBodyLength());
response.release();
// Third message first content chunk
content = channel.readInbound();
assertInstanceOf(LastMemcacheContent.class, content);
assertEquals(msgBody, content.content().toString(CharsetUtil.UTF_8));
content.release();
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does shouldDecodeSeparatedValues() do?
shouldDecodeSeparatedValues() is a function in the netty codebase, defined in codec-memcache/src/test/java/io/netty/handler/codec/memcache/binary/BinaryMemcacheDecoderTest.java.
Where is shouldDecodeSeparatedValues() defined?
shouldDecodeSeparatedValues() is defined in codec-memcache/src/test/java/io/netty/handler/codec/memcache/binary/BinaryMemcacheDecoderTest.java at line 203.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free