nfsantos commented on code in PR #1142:
URL: https://github.com/apache/jackrabbit-oak/pull/1142#discussion_r1351850691
##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentNodeStoreBuilderBase.java:
##########
@@ -212,6 +213,15 @@ MongoStatus getMongoStatus() {
return mongoStatus;
}
+ /**
+ * Returns the MongoDB client configured in the {@link #setMongoDB(String,
String, int)} method.
+ *
+ * @return the client or null if the {@link #setMongoDB(String, String,
int)} method hasn't been called.
+ */
+ public MongoClient getMongoClient() {
+ return mongoClient;
Review Comment:
The class is not keeping a reference to `mongoDBConnection` in a field. We
could change it to keep `mongoDBConnection` in a field instead of the
references to `mongoClient` for `mongoDBConnection.getClient()` and
`mongoStatus` for `mongoDBConnection.getStatus()`, but this would create
unnecessary coupling between `MongoDocumentNodeStoreBuilderBase` and
`MongoDBConnection`. MongoDBConnection contains fields that are not needed by
`MongoDocumentNodeStoreBuilderBase`. I would prefer to leave it as is.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]