public enum Consistency extends Enum<Consistency>
Stale (for the views)
and ScanConsistency (for the N1QL queries).| Enum Constant and Description |
|---|
EVENTUALLY_CONSISTENT
EVENTUALLY_CONSISTENT is
Stale.TRUE and ScanConsistency.NOT_BOUNDED |
READ_YOUR_OWN_WRITES
READ_YOUR_OWN_WRITES is
Stale.FALSE and ScanConsistency.STATEMENT_PLUS |
STRONGLY_CONSISTENT
STRONGLY_CONSISTENT is
Stale.FALSE and ScanConsistency.REQUEST_PLUS |
UPDATE_AFTER
UPDATE_AFTER is
Stale.UPDATE_AFTER and ScanConsistency.NOT_BOUNDED |
| Modifier and Type | Field and Description |
|---|---|
static Consistency |
DEFAULT_CONSISTENCY
The static default Consistency (
READ_YOUR_OWN_WRITES). |
| Modifier and Type | Method and Description |
|---|---|
com.couchbase.client.java.query.consistency.ScanConsistency |
n1qlConsistency()
Returns the
N1QL consistency corresponding to this Consistency. |
static Consistency |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Consistency[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
com.couchbase.client.java.view.Stale |
viewConsistency()
Returns the
view consistency corresponding to this Consistency. |
public static final Consistency READ_YOUR_OWN_WRITES
Stale.FALSE and ScanConsistency.STATEMENT_PLUSpublic static final Consistency STRONGLY_CONSISTENT
Stale.FALSE and ScanConsistency.REQUEST_PLUSpublic static final Consistency UPDATE_AFTER
Stale.UPDATE_AFTER and ScanConsistency.NOT_BOUNDEDpublic static final Consistency EVENTUALLY_CONSISTENT
Stale.TRUE and ScanConsistency.NOT_BOUNDEDpublic static final Consistency DEFAULT_CONSISTENCY
READ_YOUR_OWN_WRITES).public static Consistency[] values()
for (Consistency c : Consistency.values()) System.out.println(c);
public static Consistency valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic com.couchbase.client.java.view.Stale viewConsistency()
view consistency corresponding to this Consistency.public com.couchbase.client.java.query.consistency.ScanConsistency n1qlConsistency()
N1QL consistency corresponding to this Consistency.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.