withWriteConcern

abstract fun withWriteConcern(writeConcern: WriteConcern): MongoDatabase

Create a new MongoDatabase instance with a different write concern.

Return

a new MongoDatabase instance with the different writeConcern

Parameters

writeConcern

the new com.mongodb.WriteConcern for the database