anmolnar commented on a change in pull request #769: ZOOKEEPER-3242: Add server
side connecting throttling
URL: https://github.com/apache/zookeeper/pull/769#discussion_r249741175
##########
File path:
zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
##########
@@ -196,14 +199,50 @@ public ZooKeeperServer(FileTxnSnapLog txnLogFactory, int
tickTime,
setMinSessionTimeout(minSessionTimeout);
setMaxSessionTimeout(maxSessionTimeout);
listener = new ZooKeeperServerListenerImpl(this);
+
readResponseCache = new ResponseCache();
+
+ connThrottle = new BlueThrottle();
Review comment:
This configuration setting block could be a little bit neater by following
the existing pattern in this class: create static constants for the
configuration option name and the default value.
The existing config setting `intBufferStartingSizeBytes` is set via static
constructor which is not convenient here, but you could overload the
constructor of `BlueThrottle` to override the default settings. In which case
you don't need these setters at all.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services