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§
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>>
sourcefn destroy_delta_db(&self, delta_db_name: &str) -> Result<()>
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.