[−][src]Enum cdrs_temp::consistency::Consistency
Consistency
is an enum which represents Cassandra's consistency levels.
To find more details about each consistency level please refer to the following documentation:
https://docs.datastax.com/en/cql-oss/3.x/cql/cql_reference/cqlshConsistency.html
Variants
Closest replica, as determined by the snitch. If all replica nodes are down, write succeeds after a hinted handoff. Provides low latency, guarantees writes never fail. Note: this consistency level can only be used for writes. It provides the lowest consistency and the highest availability.
A write must be written to the commit log and memtable of at least one replica node. Satisfies the needs of most users because consistency requirements are not stringent.
A write must be written to the commit log and memtable of at least two replica nodes. Similar to ONE.
A write must be written to the commit log and memtable of at least three replica nodes. Similar to TWO.
A write must be written to the commit log and memtable on a quorum of replica nodes. Provides strong consistency if you can tolerate some level of failure.
A write must be written to the commit log and memtable on all replica nodes in the cluster for that partition key. Provides the highest consistency and the lowest availability of any other level.
Strong consistency. A write must be written to the commit log and memtable on a quorum of replica nodes in the same data center as thecoordinator node. Avoids latency of inter-data center communication. Used in multiple data center clusters with a rack-aware replica placement strategy, such as NetworkTopologyStrategy, and a properly configured snitch. Use to maintain consistency locally (within the single data center). Can be used with SimpleStrategy.
Strong consistency. A write must be written to the commit log and memtable on a quorum of replica nodes in all data center. Used in multiple data center clusters to strictly maintain consistency at the same level in each data center. For example, choose this level if you want a read to fail when a data center is down and the QUORUM cannot be reached on that data center.
Achieves linearizable consistency for lightweight transactions by preventing unconditional updates. You cannot configure this level as a normal consistency level, configured at the driver level using the consistency level field. You configure this level using the serial consistency field as part of the native protocol operation. See failure scenarios.
Same as SERIAL but confined to the data center. A write must be written conditionally to the commit log and memtable on a quorum of replica nodes in the same data center. Same as SERIAL. Used for disaster recovery. See failure scenarios.
A write must be sent to, and successfully acknowledged by, at least one replica node in the local data center. In a multiple data center clusters, a consistency level of ONE is often desirable, but cross-DC traffic is not. LOCAL_ONE accomplishes this. For security and quality reasons, you can use this consistency level in an offline datacenter to prevent automatic connection to online nodes in other data centers if an offline node goes down.
This is an error scenario either the client code doesn't support it or server is sending bad headers
Trait Implementations
impl Clone for Consistency
[src]
fn clone(&self) -> Consistency
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Consistency
[src]
impl Debug for Consistency
[src]
impl Default for Consistency
[src]
fn default() -> Consistency
[src]
impl From<i32> for Consistency
[src]
fn from(bytes: i32) -> Consistency
[src]
impl FromBytes for Consistency
[src]
fn from_bytes(bytes: &[u8]) -> Result<Consistency>
[src]
impl FromCursor for Consistency
[src]
fn from_cursor(cursor: &mut Cursor<&[u8]>) -> Result<Consistency>
[src]
impl IntoBytes for Consistency
[src]
fn into_cbytes(&self) -> Vec<u8>
[src]
impl PartialEq<Consistency> for Consistency
[src]
fn eq(&self, other: &Consistency) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for Consistency
[src]
Auto Trait Implementations
impl RefUnwindSafe for Consistency
impl Send for Consistency
impl Sync for Consistency
impl Unpin for Consistency
impl UnwindSafe for Consistency
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Sealed<T> for T where
T: ?Sized,
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,