rishabhdaim commented on code in PR #295:
URL: https://github.com/apache/jackrabbit-oak/pull/295#discussion_r963460227


##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDBConnection.java:
##########
@@ -61,16 +64,19 @@ final class MongoDBConnection {
     static MongoDBConnection newMongoDBConnection(@NotNull String uri,
                                                   @NotNull String name,
                                                   @NotNull MongoClock clock,
-                                                  int socketTimeout,
-                                                  boolean socketKeepAlive) {
+                                                  int socketTimeout) {
         CompositeServerMonitorListener serverMonitorListener = new 
CompositeServerMonitorListener();
-        MongoClientOptions.Builder options = 
MongoConnection.getDefaultBuilder();
-        options.addServerMonitorListener(serverMonitorListener);
-        options.socketKeepAlive(socketKeepAlive);
+        MongoClientSettings.Builder options = 
MongoConnection.getDefaultBuilder();
+        options.applyToServerSettings((builder) -> {

Review Comment:
   No need for parentheses and curly braces for one line inside the lambda.
   ```suggestion
           options.applyToServerSettings(builder -> 
builder.addServerMonitorListener(serverMonitorListener));
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to