Skip to main content

WriteEngine

Trait WriteEngine 

Source
pub trait WriteEngine: Send {
    // Required methods
    fn commit(&self, groups: &[CommitGroup]) -> Result<Vec<CommittedSlot>>;
    fn checkpoint(
        &self,
        graph: &dyn CheckpointDirtyMarks,
        lsn: u64,
        snapshot_ts: u64,
    ) -> Result<()>;
    fn poll_follow(&self, from_lsn: u64) -> Result<FollowBatch>;
    fn reload(&self, graph: &mut dyn GraphImport) -> Result<()>;
}

Required Methods§

Source

fn commit(&self, groups: &[CommitGroup]) -> Result<Vec<CommittedSlot>>

Make groups durable. Each group already carries the commit timestamp admission assigned. Returns those timestamps with the log sequence number the append gave them.

Source

fn checkpoint( &self, graph: &dyn CheckpointDirtyMarks, lsn: u64, snapshot_ts: u64, ) -> Result<()>

Publish a snapshot of graph at snapshot_ts, covering the log through lsn.

Source

fn poll_follow(&self, from_lsn: u64) -> Result<FollowBatch>

Records with lsn greater than from_lsn.

Source

fn reload(&self, graph: &mut dyn GraphImport) -> Result<()>

The facade installs a reloaded query engine. This reopens the log against the snapshot the caller has already loaded into graph.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§