public final class ReadConcern
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ReadConcern |
DEFAULT
Use the servers default read concern.
|
private ReadConcernLevel |
level |
static ReadConcern |
LINEARIZABLE
The linearizable read concern.
|
static ReadConcern |
LOCAL
The local read concern.
|
static ReadConcern |
MAJORITY
The majority read concern.
|
Modifier | Constructor and Description |
---|---|
private |
ReadConcern() |
|
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() |
private final ReadConcernLevel level
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 levelprivate ReadConcern()
public 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