Enum ReadPreference

java.lang.Object
java.lang.Enum<ReadPreference>
com.couchbase.client.java.kv.ReadPreference
All Implemented Interfaces:
Serializable, Comparable<ReadPreference>

public enum ReadPreference extends Enum<ReadPreference>
Represents the read preference for a given replica get operation.
  • Enum Constant Details

    • NO_PREFERENCE

      public static final ReadPreference NO_PREFERENCE
      No preference is set.
    • PREFERRED_SERVER_GROUP

      public static final ReadPreference PREFERRED_SERVER_GROUP
      This operation will aim to read from a preferred server group, that is configured at Cluster initialization time.
  • Method Details

    • values

      public static ReadPreference[] 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

      public static ReadPreference 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 name
      NullPointerException - if the argument is null