Package io.trino.plugin.mongodb
Enum ReadPreferenceType
- java.lang.Object
-
- java.lang.Enum<ReadPreferenceType>
-
- io.trino.plugin.mongodb.ReadPreferenceType
-
- All Implemented Interfaces:
Serializable,Comparable<ReadPreferenceType>
public enum ReadPreferenceType extends Enum<ReadPreferenceType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NEARESTPRIMARYPRIMARY_PREFERREDSECONDARYSECONDARY_PREFERRED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.mongodb.ReadPreferencegetReadPreference()static ReadPreferenceTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ReadPreferenceType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PRIMARY
public static final ReadPreferenceType PRIMARY
-
PRIMARY_PREFERRED
public static final ReadPreferenceType PRIMARY_PREFERRED
-
SECONDARY
public static final ReadPreferenceType SECONDARY
-
SECONDARY_PREFERRED
public static final ReadPreferenceType SECONDARY_PREFERRED
-
NEAREST
public static final ReadPreferenceType NEAREST
-
-
Method Detail
-
values
public static ReadPreferenceType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ReadPreferenceType c : ReadPreferenceType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ReadPreferenceType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getReadPreference
public com.mongodb.ReadPreference getReadPreference()
-
-