Skip to main content

AtomicJournalStore

Trait AtomicJournalStore 

Source
pub trait AtomicJournalStore {
    // Required methods
    fn read(
        &mut self,
        keys: &[String],
    ) -> Result<Vec<JournalVersion>, LinkError>;
    fn compare_exchange(
        &mut self,
        keys: &[String],
        expected: &[JournalVersion],
        updates: &[Option<Vec<String>>],
    ) -> Result<bool, LinkError>;

    // Provided method
    fn supports_durable_flush(&self) -> bool { ... }
}
Expand description

All keys in read must be read at one linearizable serialization point. CAS checks EVERY selected generation and writes all updates atomically. Never retry a mutation on transport errors: its outcome may be unknown.

Required Methods§

Source

fn read(&mut self, keys: &[String]) -> Result<Vec<JournalVersion>, LinkError>

Source

fn compare_exchange( &mut self, keys: &[String], expected: &[JournalVersion], updates: &[Option<Vec<String>>], ) -> Result<bool, LinkError>

Provided Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§