Skip to main content

SyncEngine

Struct SyncEngine 

Source
pub struct SyncEngine<M: RecordMapper> { /* private fields */ }

Implementations§

Source§

impl<M: RecordMapper + 'static> SyncEngine<M>
where M::Item: 'static,

Source

pub fn ledger(&self) -> &Ledger

Source

pub fn note_changed(&mut self, id: &str) -> SyncResult<()>

Offline queue: record that id changed locally. Durable immediately.

Source

pub fn note_deleted(&mut self, id: &str) -> SyncResult<()>

Local deletion: block the id and queue a tombstone write. Durable.

Source

pub fn request_full_replay_once(&mut self, flag: &str)

Replay the whole zone once for flag (one-shot repair migrations).

Source

pub fn run_pass(&mut self) -> PassReport

Runs one sync pass and records it in SyncEngine::metrics.

Source

pub fn status(&self) -> SyncStatus

Pass counters, ledger queue sizes and process resource usage, read now. No polling thread runs for this.

Source

pub fn metrics(&self) -> SyncMetrics

Cumulative pass counters and current ledger queue sizes.

Auto Trait Implementations§

§

impl<M> !RefUnwindSafe for SyncEngine<M>

§

impl<M> !UnwindSafe for SyncEngine<M>

§

impl<M> Freeze for SyncEngine<M>

§

impl<M> Send for SyncEngine<M>
where Arc<M>: Send, Arc<dyn LocalStore<<M as RecordMapper>::Item>>: Send, Box<dyn ConflictPolicy<<M as RecordMapper>::Item>>: Send,

§

impl<M> Sync for SyncEngine<M>
where Arc<M>: Sync, Arc<dyn LocalStore<<M as RecordMapper>::Item>>: Sync, Box<dyn ConflictPolicy<<M as RecordMapper>::Item>>: Sync,

§

impl<M> Unpin for SyncEngine<M>
where Arc<M>: Unpin, Arc<dyn LocalStore<<M as RecordMapper>::Item>>: Unpin, Box<dyn ConflictPolicy<<M as RecordMapper>::Item>>: Unpin,

§

impl<M> UnsafeUnpin for SyncEngine<M>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.