jhuan31 commented on a change in pull request #769: ZOOKEEPER-3242: Add server
side connecting throttling
URL: https://github.com/apache/zookeeper/pull/769#discussion_r249888591
##########
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:
Agree. Those setter invocations in the constructor look ugly. Moved them
out. But we still need the setters for the JMX interface. And since we are
keeping setters, I'd prefer to use them in the unit tests instead of using a
constructor with a long list of parameters, i.e, I prefer to explicitly set the
refill time to 100 instead of setting the third parameter of the constructor to
100.
----------------------------------------------------------------
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