Package com.couchbase.client.java.kv
Enum ReadPreference
- All Implemented Interfaces:
Serializable
,Comparable<ReadPreference>
Represents the read preference for a given replica get operation.
-
Enum Constant Summary
Enum ConstantDescriptionNo preference is set.This operation will aim to read from a preferred server group, that is configured at Cluster initialization time. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReadPreference
Returns the enum constant of this type with the specified name.static ReadPreference[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NO_PREFERENCE
No preference is set. -
PREFERRED_SERVER_GROUP
This operation will aim to read from a preferred server group, that is configured at Cluster initialization time.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-