pub trait DeltaDbManagerTrait {
    type DeltaDb: DeltaDbTrait;

    // Required methods
    fn get_delta_db_dir(&self) -> &Path;
    fn get_delta_db_name(&self, snapshot_epoch_id: &EpochId) -> String;
    fn get_delta_db_path(&self, delta_db_name: &str) -> PathBuf;
    fn new_empty_delta_db(&self, delta_db_name: &str) -> Result<Self::DeltaDb>;
    fn get_delta_db(&self, delta_db_name: &str) -> Result<Option<Self::DeltaDb>>;
    fn destroy_delta_db(&self, delta_db_name: &str) -> Result<()>;

    // Provided method
    fn scan_persist_state(
        &self,
        snapshot_info_map: &HashMap<EpochId, SnapshotInfo>
    ) -> Result<(Vec<EpochId>, HashMap<EpochId, Self::DeltaDb>)> { ... }
}

Required Associated Types§

Required Methods§

source

fn get_delta_db_dir(&self) -> &Path

source

fn get_delta_db_name(&self, snapshot_epoch_id: &EpochId) -> String

source

fn get_delta_db_path(&self, delta_db_name: &str) -> PathBuf

source

fn new_empty_delta_db(&self, delta_db_name: &str) -> Result<Self::DeltaDb>

source

fn get_delta_db(&self, delta_db_name: &str) -> Result<Option<Self::DeltaDb>>

source

fn destroy_delta_db(&self, delta_db_name: &str) -> Result<()>

Destroy a Delta DB. Keep in mind that this method is irrecoverable. Ref-counting is necessary for Delta1 MPT in Snapshot.

Provided Methods§

source

fn scan_persist_state( &self, snapshot_info_map: &HashMap<EpochId, SnapshotInfo> ) -> Result<(Vec<EpochId>, HashMap<EpochId, Self::DeltaDb>)>

Implementors§