public interface ConsistencyLevel
The only reason to model this as an interface (as opposed to an enum type) is to accommodate
 for custom protocol extensions. If you're connecting to a standard Apache Cassandra cluster, all
 ConsistencyLevels are DefaultConsistencyLevel instances.
| Modifier and Type | Field and Description | 
|---|---|
| static ConsistencyLevel | ALL | 
| static ConsistencyLevel | ANY | 
| static ConsistencyLevel | EACH_QUORUM | 
| static ConsistencyLevel | LOCAL_ONE | 
| static ConsistencyLevel | LOCAL_QUORUM | 
| static ConsistencyLevel | LOCAL_SERIAL | 
| static ConsistencyLevel | ONE | 
| static ConsistencyLevel | QUORUM | 
| static ConsistencyLevel | SERIAL | 
| static ConsistencyLevel | THREE | 
| static ConsistencyLevel | TWO | 
| Modifier and Type | Method and Description | 
|---|---|
| int | getProtocolCode()The numerical value that the level is encoded to in protocol frames. | 
| boolean | isDcLocal()Whether this consistency level applies to the local datacenter only. | 
| boolean | isSerial()Whether this consistency level is serial, that is, applies only to the "paxos" phase of a lightweight
 transaction. | 
| String | name()The textual representation of the level in configuration files. | 
static final ConsistencyLevel ANY
static final ConsistencyLevel ONE
static final ConsistencyLevel TWO
static final ConsistencyLevel THREE
static final ConsistencyLevel QUORUM
static final ConsistencyLevel ALL
static final ConsistencyLevel LOCAL_ONE
static final ConsistencyLevel LOCAL_QUORUM
static final ConsistencyLevel EACH_QUORUM
static final ConsistencyLevel SERIAL
static final ConsistencyLevel LOCAL_SERIAL
int getProtocolCode()
@NonNull String name()
boolean isDcLocal()
boolean isSerial()
Serial consistency levels are only meaningful when executing conditional updates (INSERT, UPDATE or DELETE statements with an IF condition).
Copyright © 2017–2023. All rights reserved.