Interface ConsistencyLevel

  • All Known Implementing Classes:
    DefaultConsistencyLevel

    public interface ConsistencyLevel
    The consistency level of a request.

    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.

    • Method Detail

      • getProtocolCode

        int getProtocolCode()
        The numerical value that the level is encoded to in protocol frames.
      • name

        @NonNull
        String name()
        The textual representation of the level in configuration files.
      • isDcLocal

        boolean isDcLocal()
        Whether this consistency level applies to the local datacenter only.
      • isSerial

        boolean isSerial()
        Whether this consistency level is serial, that is, applies only to the "paxos" phase of a lightweight transaction.

        Serial consistency levels are only meaningful when executing conditional updates ( INSERT, UPDATE or DELETE statements with an IF condition).