withWriteConcern

abstract fun withWriteConcern(writeConcern: WriteConcern): MongoCollection<TDocument>

Create a new MongoCollection instance with a different write concern.

Return

a new MongoCollection instance with the different writeConcern

Parameters

writeConcern

the new com.mongodb.WriteConcern for the collection