Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.optionsReadConcern

ReadConcern

The read concern allows configuring the level of consistency required for each operation.

Operations which do not specify a read concern inherit the global default setting for the replica set or shard cluster.

External resources

Entries

Local

The query returns data from the instance with no guarantee that the data has been written to a majority of the replica set—it may be rolled back.

Available

The query returns data from the instance with no guarantee that the data has been written to a majority of the replica set—it may be rolled back.

Majority

The query returns data that has been acknowledged by a majority of the replica set members. The documents returned are durable, even in the event of failure.

Linearizable

The query returns data that reflects all successful majority-acknowledged writes that completed prior to the start of the read operation. The query may wait for concurrently executing writes to propagate to a majority of replica set members before returning results.

Snapshot

A query returns majority-committed data as it appears across shards from a specific single point in the recent past.

Properties

bsonName

name

val name: String

ordinal

val ordinal: Int

Functions

valueOf

fun valueOf(value: String): ReadConcern

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

values

Returns an array containing the constants of this enum type, in the order they're declared.