public enum MongoReadConcern extends Enum<MongoReadConcern>
ReadConcern enumeration.| Enum Constant and Description |
|---|
DEFAULT
The servers default read concern.
|
LINEARIZABLE
The linearizable read concern.
|
LOCAL
The local read concern.
|
MAJORITY
The majority read concern.
|
| Modifier and Type | Method and Description |
|---|---|
com.mongodb.ReadConcern |
getReadConcern()
Get the actual
ReadConcern implementation. |
static MongoReadConcern |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MongoReadConcern[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MongoReadConcern DEFAULT
public static final MongoReadConcern LOCAL
public static final MongoReadConcern MAJORITY
public static final MongoReadConcern LINEARIZABLE
This read concern is only compatible with ReadPreference.primary().
public static MongoReadConcern[] values()
for (MongoReadConcern c : MongoReadConcern.values()) System.out.println(c);
public static MongoReadConcern valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic com.mongodb.ReadConcern getReadConcern()
ReadConcern implementation.Copyright © 2019 The Holon Platform. All rights reserved.