KandraConsistency

Consistency levels for ScyllaDB/Cassandra operations.

Write consistency

Default: LOCAL_QUORUM — majority of replicas in the local DC must acknowledge.

Read consistency

Default: LOCAL_ONE — single replica in the local DC, fastest possible read.

LWT serial consistency (for saveIfNotExists)

Use LOCAL_SERIAL (default) for Paxos within the local DC only. Use SERIAL for globally unique constraints (e.g. a username unique across ALL DCs).

Consistency resolution order (highest priority first)

  1. Per-operation parameter on the repository method

  2. @ReadConsistency / @WriteConsistency annotation on the entity class

  3. KandraConfig.consistency.defaultRead / defaultWrite

Entries

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Single replica in the local DC — fastest read, weakest guarantee.

Link copied to clipboard

Majority of replicas in the local DC — default write.

Link copied to clipboard

Write to majority in EVERY DC — strongest multi-DC write guarantee.

Link copied to clipboard

Paxos serial consistency in local DC only — default for LWT.

Link copied to clipboard

Global Paxos across all DCs — required for globally unique constraints.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.