Enum Class Consistency
- All Implemented Interfaces:
Serializable
,Comparable<Consistency>
,Constable
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é
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionEVENTUALLY_CONSISTENT isViewScanConsistency.UPDATE_AFTER
andQueryScanConsistency.NOT_BOUNDED
READ_YOUR_OWN_WRITES isViewScanConsistency.REQUEST_PLUS
andQueryScanConsistency.REQUEST_PLUS
STRONGLY_CONSISTENT isViewScanConsistency.REQUEST_PLUS
andQueryScanConsistency.REQUEST_PLUS
UPDATE_AFTER isViewScanConsistency.UPDATE_AFTER
andQueryScanConsistency.NOT_BOUNDED
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Consistency
The static default Consistency (READ_YOUR_OWN_WRITES
). -
Method Summary
Modifier and TypeMethodDescriptioncom.couchbase.client.java.query.QueryScanConsistency
Returns theconsistency
corresponding to thisConsistency
.static Consistency
Returns the enum constant of this class with the specified name.static Consistency[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.com.couchbase.client.java.view.ViewScanConsistency
Returns theview consistency
corresponding to thisConsistency
.
-
Enum Constant Details
-
READ_YOUR_OWN_WRITES
READ_YOUR_OWN_WRITES isViewScanConsistency.REQUEST_PLUS
andQueryScanConsistency.REQUEST_PLUS
-
STRONGLY_CONSISTENT
STRONGLY_CONSISTENT isViewScanConsistency.REQUEST_PLUS
andQueryScanConsistency.REQUEST_PLUS
-
UPDATE_AFTER
UPDATE_AFTER isViewScanConsistency.UPDATE_AFTER
andQueryScanConsistency.NOT_BOUNDED
-
EVENTUALLY_CONSISTENT
EVENTUALLY_CONSISTENT isViewScanConsistency.UPDATE_AFTER
andQueryScanConsistency.NOT_BOUNDED
-
-
Field Details
-
DEFAULT_CONSISTENCY
The static default Consistency (READ_YOUR_OWN_WRITES
).
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
viewConsistency
public com.couchbase.client.java.view.ViewScanConsistency viewConsistency()Returns theview consistency
corresponding to thisConsistency
.- Returns:
- the view consistency.
-
n1qlConsistency
public com.couchbase.client.java.query.QueryScanConsistency n1qlConsistency()Returns theconsistency
corresponding to thisConsistency
.- Returns:
- the N1QL consistency.
-