Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public final class NettyChannelBuilder
private ChannelFactory<? extends Channel> channelFactory = DEFAULT_CHANNEL_FACTORY;
private ObjectPool<? extends EventLoopGroup> eventLoopGroupPool = DEFAULT_EVENT_LOOP_GROUP_POOL;
private SslContext sslContext;
private boolean autoFlowControl;
private boolean autoFlowControl = true;
private int flowControlWindow = DEFAULT_FLOW_CONTROL_WINDOW;
private int maxHeaderListSize = GrpcUtil.DEFAULT_MAX_HEADER_LIST_SIZE;
private long keepAliveTimeNanos = KEEPALIVE_TIME_NANOS_DISABLED;
Expand Down Expand Up @@ -250,7 +250,8 @@ public NettyChannelBuilder sslContext(SslContext sslContext) {
/**
* Sets the initial flow control window in bytes. Setting initial flow control window enables auto
* flow control tuning using bandwidth-delay product algorithm. To disable auto flow control
* tuning, use {@link #flowControlWindow(int)}.
* tuning, use {@link #flowControlWindow(int)}. By default, auto flow control is enabled with
* initial flow control window size of {@link #DEFAULT_FLOW_CONTROL_WINDOW}.
*/
public NettyChannelBuilder initialFlowControlWindow(int initialFlowControlWindow) {
checkArgument(initialFlowControlWindow > 0, "initialFlowControlWindow must be positive");
Expand All @@ -262,7 +263,8 @@ public NettyChannelBuilder initialFlowControlWindow(int initialFlowControlWindow
/**
* Sets the flow control window in bytes. Setting flowControlWindow disables auto flow control
* tuning; use {@link #initialFlowControlWindow(int)} to enable auto flow control tuning. If not
* called, the default value is {@link #DEFAULT_FLOW_CONTROL_WINDOW}).
* called, the default value is {@link #DEFAULT_FLOW_CONTROL_WINDOW}) with auto flow control
* tuning.
*/
public NettyChannelBuilder flowControlWindow(int flowControlWindow) {
checkArgument(flowControlWindow > 0, "flowControlWindow must be positive");
Expand Down
8 changes: 5 additions & 3 deletions netty/src/main/java/io/grpc/netty/NettyServerBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public final class NettyServerBuilder extends AbstractServerImplBuilder<NettySer
private SslContext sslContext;
private ProtocolNegotiator protocolNegotiator;
private int maxConcurrentCallsPerConnection = Integer.MAX_VALUE;
private boolean autoFlowControl = false;
private boolean autoFlowControl = true;
private int flowControlWindow = DEFAULT_FLOW_CONTROL_WINDOW;
private int maxMessageSize = DEFAULT_MAX_MESSAGE_SIZE;
private int maxHeaderListSize = GrpcUtil.DEFAULT_MAX_HEADER_LIST_SIZE;
Expand Down Expand Up @@ -349,7 +349,8 @@ public NettyServerBuilder maxConcurrentCallsPerConnection(int maxCalls) {
/**
* Sets the initial flow control window in bytes. Setting initial flow control window enables auto
* flow control tuning using bandwidth-delay product algorithm. To disable auto flow control
* tuning, use {@link #flowControlWindow(int)}.
* tuning, use {@link #flowControlWindow(int)}. By default, auto flow control is enabled with
* initial flow control window size of {@link #DEFAULT_FLOW_CONTROL_WINDOW}.
*/
public NettyServerBuilder initialFlowControlWindow(int initialFlowControlWindow) {
checkArgument(initialFlowControlWindow > 0, "initialFlowControlWindow must be positive");
Expand All @@ -361,7 +362,8 @@ public NettyServerBuilder initialFlowControlWindow(int initialFlowControlWindow)
/**
* Sets the flow control window in bytes. Setting flowControlWindow disables auto flow control
* tuning; use {@link #initialFlowControlWindow(int)} to enable auto flow control tuning. If not
* called, the default value is {@link #DEFAULT_FLOW_CONTROL_WINDOW}).
* called, the default value is {@link #DEFAULT_FLOW_CONTROL_WINDOW}) with auto flow control
* tuning.
*/
public NettyServerBuilder flowControlWindow(int flowControlWindow) {
checkArgument(flowControlWindow > 0, "flowControlWindow must be positive: %s",
Expand Down