public enum ConsistencyLevel extends java.lang.Enum<ConsistencyLevel> implements org.apache.thrift.TEnum
<ReplicationFactor>
nodes before responding to the client.
Read consistency levels make the following guarantees before returning successful results to the client:
ANY Not supported. You probably want ONE instead.
ONE Returns the record obtained from a single replica.
TWO Returns the record with the most recent timestamp once two replicas have replied.
THREE Returns the record with the most recent timestamp once three replicas have replied.
QUORUM Returns the record with the most recent timestamp once a majority of replicas have replied.
LOCAL_ONE Returns the record with the most recent timestamp once a single replica within the local datacenter have replied.
LOCAL_QUORUM Returns the record with the most recent timestamp once a majority of replicas within the local datacenter have replied.
EACH_QUORUM Returns the record with the most recent timestamp once a majority of replicas within each datacenter have replied.
ALL Returns the record with the most recent timestamp once all replicas have replied (implies no replica may be down)..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 |
---|---|
static ConsistencyLevel |
findByValue(int value)
Find a the enum type by its integer value, as defined in the Thrift IDL.
|
int |
getValue()
Get the integer value of this enum value, as defined in the Thrift IDL.
|
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 ONE
public static final ConsistencyLevel QUORUM
public static final ConsistencyLevel LOCAL_QUORUM
public static final ConsistencyLevel EACH_QUORUM
public static final ConsistencyLevel ALL
public static final ConsistencyLevel ANY
public static final ConsistencyLevel TWO
public static final ConsistencyLevel THREE
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(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 int getValue()
getValue
in interface org.apache.thrift.TEnum
public static ConsistencyLevel findByValue(int value)
Copyright © 2020 The Apache Software Foundation