Trait raftstore::store::snap::Snapshot[][src]

pub trait Snapshot<EK: KvEngine>: GenericSnapshot {
    fn build(
        &mut self,
        engine: &EK,
        kv_snap: &EK::Snapshot,
        region: &Region,
        snap_data: &mut RaftSnapshotData,
        stat: &mut SnapshotStatistics
    ) -> RaftStoreResult<()>;
fn apply(&mut self, options: ApplyOptions<EK>) -> Result<(), Error>; }

Snapshot is a trait for snapshot. It’s used in these scenarios:

  1. build local snapshot
  2. read local snapshot and then replicate it to remote raftstores
  3. receive snapshot from remote raftstore and write it to local storage
  4. apply snapshot
  5. snapshot gc

Required methods

fn build(
    &mut self,
    engine: &EK,
    kv_snap: &EK::Snapshot,
    region: &Region,
    snap_data: &mut RaftSnapshotData,
    stat: &mut SnapshotStatistics
) -> RaftStoreResult<()>
[src]

fn apply(&mut self, options: ApplyOptions<EK>) -> Result<(), Error>[src]

Loading content...

Implementors

impl<EK> Snapshot<EK> for Snap where
    EK: KvEngine
[src]

Loading content...