public enum ReadConcernLevel extends Enum<ReadConcernLevel>
Enum Constant and Description |
---|
LOCAL
Return the node's most recent copy of data.
|
MAJORITY
Return the node's most recent copy of the data confirmed as having been written to a majority of the nodes.
|
Modifier and Type | Method and Description |
---|---|
static ReadConcernLevel |
fromString(String readConcernLevel)
Returns the ReadConcern from the string read concern level.
|
String |
getValue() |
static ReadConcernLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ReadConcernLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ReadConcernLevel LOCAL
public static final ReadConcernLevel MAJORITY
public static ReadConcernLevel[] values()
for (ReadConcernLevel c : ReadConcernLevel.values()) System.out.println(c);
public static ReadConcernLevel 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 String getValue()
public static ReadConcernLevel fromString(String readConcernLevel)
readConcernLevel
- the read concern level string.