public final class ReadConcern
extends java.lang.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 level)
Construct a new read concern
|
Modifier and Type | Method and Description |
---|---|
BsonDocument |
asDocument()
Gets this read concern as a document.
|
boolean |
equals(java.lang.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 levelpublic ReadConcernLevel getLevel()
public boolean isServerDefault()
public BsonDocument asDocument()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object