/** * Returns true if the majority write concern is used for the given DB. * * @param db the connection to MongoDB. * @return true if the majority write concern has been configured; false otherwise */ public static boolean isMajorityWriteConcern(@NotNull MongoDatabase db) { return WriteConcern.MAJORITY.getWString().equals(db.getWriteConcern().getWObject()); }
/** * Returns true if the majority write concern is used for the given DB. * * @param db the connection to MongoDB. * @return true if the majority write concern has been configured; false otherwise */ public static boolean isMajorityWriteConcern(@NotNull MongoDatabase db) { return WriteConcern.MAJORITY.getWString().equals(db.getWriteConcern().getWObject()); }
@NotNull @Override public WriteConcern getWriteConcern() { return db.getWriteConcern(); }
MongoStatus status, int blobCacheSizeMB) { if (!MongoConnection.isSufficientWriteConcern(client, db.getWriteConcern())) { LOG.warn("Insufficient write concern: " + db.getWriteConcern() + " At least " + MongoConnection.getDefaultWriteConcern(client) + " is recommended.");
MongoStatus status, int blobCacheSizeMB) { if (!MongoConnection.isSufficientWriteConcern(client, db.getWriteConcern())) { LOG.warn("Insufficient write concern: " + db.getWriteConcern() + " At least " + MongoConnection.getDefaultWriteConcern(client) + " is recommended.");
maxDeltaForModTimeIdxSecs, disableIndexHint, status.isClientSessionSupported(), useClientSession, db.getWriteConcern(), mongoStatus.getServerDetails());
maxDeltaForModTimeIdxSecs, disableIndexHint, status.isClientSessionSupported(), useClientSession, db.getWriteConcern(), mongoStatus.getServerDetails());