public final class ReadConcern extends Object
Modifier and Type | Field and Description |
---|---|
static ReadConcern |
DEFAULT
Use the servers default read concern.
|
static ReadConcern |
LINEARIZABLE
The linearizable read concern.
|
static ReadConcern |
LOCAL
The local read concern.
|
static ReadConcern |
MAJORITY
The majority read concern.
|
Constructor and Description |
---|
ReadConcern(ReadConcernLevel readConcernLevel)
Construct a new read concern
|
Modifier and Type | Method and Description |
---|---|
BsonDocument |
asDocument()
Gets this read concern as a document.
|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isServerDefault() |
public static final ReadConcern DEFAULT
public static final ReadConcern LOCAL
public static final ReadConcern MAJORITY
public static final ReadConcern LINEARIZABLE
This read concern is only compatible with ReadPreference.primary()
.
public ReadConcern(ReadConcernLevel readConcernLevel)
readConcernLevel
- the read concern levelpublic boolean isServerDefault()
public BsonDocument asDocument()