public final class ReadConcern extends Object
Modifier and Type | Field | 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 | Description |
---|---|
ReadConcernβ(ReadConcernLevel level) |
Construct a new read concern
|
Modifier and Type | Method | Description |
---|---|---|
BsonDocument |
asDocumentβ() |
Gets this read concern as a document.
|
boolean |
equalsβ(Object o) |
|
ReadConcernLevel |
getLevelβ() |
Gets the read concern level.
|
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 level)
level
- the read concern level@Nullable public ReadConcernLevel getLevelβ()
public boolean isServerDefaultβ()
public BsonDocument asDocumentβ()