Clarify deprecation docs a bit. (#8226)
Motivation: It seems to sometimes confuse people what to do to replace setMaxMessagePerRead(...). Modifications: Add some more details to the javadocs about the correct replacement. Result: Related to https://github.com/netty/netty/issues/8214.
This commit is contained in:
parent
37a4f99f25
commit
1bd9e662dd
@ -121,7 +121,8 @@ public interface ChannelConfig {
|
||||
ChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis);
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link MaxMessagesRecvByteBufAllocator}
|
||||
* @deprecated Use {@link MaxMessagesRecvByteBufAllocator} and
|
||||
* {@link MaxMessagesRecvByteBufAllocator#maxMessagesPerRead()}.
|
||||
* <p>
|
||||
* Returns the maximum number of messages to read per read loop.
|
||||
* a {@link ChannelInboundHandler#channelRead(ChannelHandlerContext, Object) channelRead()} event.
|
||||
@ -131,7 +132,8 @@ public interface ChannelConfig {
|
||||
int getMaxMessagesPerRead();
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link MaxMessagesRecvByteBufAllocator}
|
||||
* @deprecated Use {@link MaxMessagesRecvByteBufAllocator} and
|
||||
* {@link MaxMessagesRecvByteBufAllocator#maxMessagesPerRead(int)}.
|
||||
* <p>
|
||||
* Sets the maximum number of messages to read per read loop.
|
||||
* If this value is greater than 1, an event loop might attempt to read multiple times to procure multiple messages.
|
||||
|
@ -78,6 +78,7 @@ public class ChannelOption<T> extends AbstractConstant<ChannelOption<T>> {
|
||||
public static final ChannelOption<Integer> CONNECT_TIMEOUT_MILLIS = valueOf("CONNECT_TIMEOUT_MILLIS");
|
||||
/**
|
||||
* @deprecated Use {@link MaxMessagesRecvByteBufAllocator}
|
||||
* and {@link MaxMessagesRecvByteBufAllocator#maxMessagesPerRead(int)}.
|
||||
*/
|
||||
@Deprecated
|
||||
public static final ChannelOption<Integer> MAX_MESSAGES_PER_READ = valueOf("MAX_MESSAGES_PER_READ");
|
||||
|
Loading…
Reference in New Issue
Block a user