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 | 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.
|
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–2019. All rights reserved.