rishabhdaim commented on code in PR #295: URL: https://github.com/apache/jackrabbit-oak/pull/295#discussion_r963570734
########## oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/MongoConnection.java: ########## @@ -300,4 +324,61 @@ public static ReadConcernLevel readConcernLevel(ReadConcern readConcern) { return ReadConcernLevel.fromString(readConcern.asDocument().getString("level").getValue()); } } + + /** + * Returns {@code true} if the MongoDB server is part of a Replica Set, + * {@code false} otherwise. The Replica Set Status is achieved by the + * ReplicaSetStatusListener, which is triggered whenever the cluster + * description changes. + * + * @param client the mongo client. + * @return {@code true} if part of Replica Set, {@code false} otherwise. + */ + public static boolean isReplicaSet(@NotNull MongoClient client) { + MongoClusterListener listener = getOakClusterListener(client); Review Comment: See the comment for `getPrimaryAddress()` -- 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