Enum Class Consistency

java.lang.Object
java.lang.Enum<Consistency>
org.springframework.data.couchbase.core.query.Consistency
All Implemented Interfaces:
Serializable, Comparable<Consistency>, Constable

public enum Consistency extends Enum<Consistency>
Enumeration of different consistency configurations to be used by the queries generated by the framework. Each consistency can be translated to a ViewScanConsistency (for the views) and QueryScanConsistency (for the N1QL queries).
Author:
Simon Baslé
  • Enum Constant Details

    • READ_YOUR_OWN_WRITES

      public static final Consistency READ_YOUR_OWN_WRITES
      READ_YOUR_OWN_WRITES is ViewScanConsistency.REQUEST_PLUS and QueryScanConsistency.REQUEST_PLUS
    • STRONGLY_CONSISTENT

      public static final Consistency STRONGLY_CONSISTENT
      STRONGLY_CONSISTENT is ViewScanConsistency.REQUEST_PLUS and QueryScanConsistency.REQUEST_PLUS
    • UPDATE_AFTER

      public static final Consistency UPDATE_AFTER
      UPDATE_AFTER is ViewScanConsistency.UPDATE_AFTER and QueryScanConsistency.NOT_BOUNDED
    • EVENTUALLY_CONSISTENT

      public static final Consistency EVENTUALLY_CONSISTENT
      EVENTUALLY_CONSISTENT is ViewScanConsistency.UPDATE_AFTER and QueryScanConsistency.NOT_BOUNDED
  • Field Details

  • Method Details

    • values

      public static Consistency[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Consistency valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • viewConsistency

      public com.couchbase.client.java.view.ViewScanConsistency viewConsistency()
      Returns the view consistency corresponding to this Consistency.
      Returns:
      the view consistency.
    • n1qlConsistency

      public com.couchbase.client.java.query.QueryScanConsistency n1qlConsistency()
      Returns the consistency corresponding to this Consistency.
      Returns:
      the N1QL consistency.