pub trait WriteEngine: Send {
// Required methods
fn commit(&self, groups: &[CommitGroup]) -> Result<Vec<CommittedSlot>>;
fn checkpoint(
&self,
graph: &dyn GraphImport,
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§
Sourcefn commit(&self, groups: &[CommitGroup]) -> Result<Vec<CommittedSlot>>
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.
Sourcefn checkpoint(
&self,
graph: &dyn GraphImport,
lsn: u64,
snapshot_ts: u64,
) -> Result<()>
fn checkpoint( &self, graph: &dyn GraphImport, lsn: u64, snapshot_ts: u64, ) -> Result<()>
Publish a snapshot of graph at snapshot_ts, covering the log
through lsn.
Sourcefn poll_follow(&self, from_lsn: u64) -> Result<FollowBatch>
fn poll_follow(&self, from_lsn: u64) -> Result<FollowBatch>
Records with lsn greater than from_lsn.
Sourcefn reload(&self, graph: &mut dyn GraphImport) -> Result<()>
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".