FixedRecvByteBufAllocator Class — netty Architecture
Architecture documentation for the FixedRecvByteBufAllocator class in FixedRecvByteBufAllocator.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD e685b42d_8609_73eb_b540_4f502543a85f["FixedRecvByteBufAllocator"] 15c35a2c_5eee_781e_92fd_b77444c4bd93["FixedRecvByteBufAllocator.java"] e685b42d_8609_73eb_b540_4f502543a85f -->|defined in| 15c35a2c_5eee_781e_92fd_b77444c4bd93 d0dd7477_c91f_7700_ac95_449c3be78b11["FixedRecvByteBufAllocator()"] e685b42d_8609_73eb_b540_4f502543a85f -->|method| d0dd7477_c91f_7700_ac95_449c3be78b11 81a21f7c_95db_2ba2_c0be_bbb77da0a055["Handle()"] e685b42d_8609_73eb_b540_4f502543a85f -->|method| 81a21f7c_95db_2ba2_c0be_bbb77da0a055
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/FixedRecvByteBufAllocator.java lines 24–61
public class FixedRecvByteBufAllocator extends DefaultMaxMessagesRecvByteBufAllocator {
private final int bufferSize;
private final class HandleImpl extends MaxMessageHandle {
private final int bufferSize;
HandleImpl(int bufferSize) {
this.bufferSize = bufferSize;
}
@Override
public int guess() {
return bufferSize;
}
}
/**
* Creates a new predictor that always returns the same prediction of
* the specified buffer size.
*/
public FixedRecvByteBufAllocator(int bufferSize) {
checkPositive(bufferSize, "bufferSize");
this.bufferSize = bufferSize;
}
@SuppressWarnings("deprecation")
@Override
public Handle newHandle() {
return new HandleImpl(bufferSize);
}
@Override
public FixedRecvByteBufAllocator respectMaybeMoreData(boolean respectMaybeMoreData) {
super.respectMaybeMoreData(respectMaybeMoreData);
return this;
}
}
Source
Frequently Asked Questions
What is the FixedRecvByteBufAllocator class?
FixedRecvByteBufAllocator is a class in the netty codebase, defined in transport/src/main/java/io/netty/channel/FixedRecvByteBufAllocator.java.
Where is FixedRecvByteBufAllocator defined?
FixedRecvByteBufAllocator is defined in transport/src/main/java/io/netty/channel/FixedRecvByteBufAllocator.java at line 24.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free