public enum ConsistencyLevel extends java.lang.Enum<ConsistencyLevel>
Enum Constant and Description |
---|
ALL |
ANY |
EACH_QUORUM |
LOCAL_QUORUM |
LOCAL_SERIAL |
ONE |
QUORUM |
SERIAL |
THREE |
TWO |
Modifier and Type | Field and Description |
---|---|
int |
code |
Modifier and Type | Method and Description |
---|---|
void |
assureSufficientLiveNodes(Keyspace keyspace,
java.lang.Iterable<java.net.InetAddress> liveEndpoints) |
int |
blockFor(Keyspace keyspace) |
java.util.List<java.net.InetAddress> |
filterForQuery(Keyspace keyspace,
java.util.List<java.net.InetAddress> liveEndpoints) |
java.util.List<java.net.InetAddress> |
filterForQuery(Keyspace keyspace,
java.util.List<java.net.InetAddress> liveEndpoints,
ReadRepairDecision readRepair) |
static ConsistencyLevel |
fromCode(int code) |
boolean |
isSerialConsistency() |
boolean |
isSufficientLiveNodes(Keyspace keyspace,
java.lang.Iterable<java.net.InetAddress> liveEndpoints) |
void |
validateCounterForWrite(CFMetaData metadata) |
void |
validateForCas() |
void |
validateForCasCommit(java.lang.String keyspaceName) |
void |
validateForRead(java.lang.String keyspaceName) |
void |
validateForWrite(java.lang.String keyspaceName) |
static ConsistencyLevel |
valueOf(java.lang.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 ConsistencyLevel[] values()
for (ConsistencyLevel c : ConsistencyLevel.values()) System.out.println(c);
public static ConsistencyLevel valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static ConsistencyLevel fromCode(int code)
public int blockFor(Keyspace keyspace)
public java.util.List<java.net.InetAddress> filterForQuery(Keyspace keyspace, java.util.List<java.net.InetAddress> liveEndpoints)
public java.util.List<java.net.InetAddress> filterForQuery(Keyspace keyspace, java.util.List<java.net.InetAddress> liveEndpoints, ReadRepairDecision readRepair)
public boolean isSufficientLiveNodes(Keyspace keyspace, java.lang.Iterable<java.net.InetAddress> liveEndpoints)
public void assureSufficientLiveNodes(Keyspace keyspace, java.lang.Iterable<java.net.InetAddress> liveEndpoints) throws UnavailableException
UnavailableException
public void validateForRead(java.lang.String keyspaceName) throws InvalidRequestException
InvalidRequestException
public void validateForWrite(java.lang.String keyspaceName) throws InvalidRequestException
InvalidRequestException
public void validateForCasCommit(java.lang.String keyspaceName) throws InvalidRequestException
InvalidRequestException
public void validateForCas() throws InvalidRequestException
InvalidRequestException
public boolean isSerialConsistency()
public void validateCounterForWrite(CFMetaData metadata) throws InvalidRequestException
InvalidRequestException
Copyright © 2013 The Apache Software Foundation