public enum ConsistencyLevel extends Enum<ConsistencyLevel>
Enum Constant and Description |
---|
ALL |
ANY |
EACH_QUORUM |
LOCAL_ONE |
LOCAL_QUORUM |
LOCAL_SERIAL |
ONE |
QUORUM |
SERIAL |
THREE |
TWO |
Modifier and Type | Method and Description |
---|---|
boolean |
isDCLocal()
Whether or not this consistency level applies to the local data-center only.
|
boolean |
isSerial()
Whether or not this consistency level is serial, that is,
applies only to the "paxos" phase of a
Lightweight transaction.
|
static ConsistencyLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConsistencyLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConsistencyLevel ANY
public static final ConsistencyLevel ONE
public static final ConsistencyLevel TWO
public static final ConsistencyLevel THREE
public static final ConsistencyLevel QUORUM
public static final ConsistencyLevel ALL
public static final ConsistencyLevel LOCAL_QUORUM
public static final ConsistencyLevel EACH_QUORUM
public static final ConsistencyLevel SERIAL
public static final ConsistencyLevel LOCAL_SERIAL
public static final ConsistencyLevel LOCAL_ONE
public static ConsistencyLevel[] values()
for (ConsistencyLevel c : ConsistencyLevel.values()) System.out.println(c);
public static ConsistencyLevel 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 boolean isDCLocal()
LOCAL_ONE
or LOCAL_QUORUM
.public boolean isSerial()
INSERT
, UPDATE
or DELETE
statements with an IF
condition).
Two consistency levels belong to this category: SERIAL
and LOCAL_SERIAL
.SERIAL
or LOCAL_SERIAL
.Statement.setSerialConsistencyLevel(ConsistencyLevel)
,
Lightweight transactions