pub trait StoragePersistenceOps:
Send
+ Sync
+ Debug {
Show 14 methods
// Required methods
fn flush(&self) -> StorageResult<()>;
fn create_checkpoint(&self) -> StorageResult<Option<CheckpointStats>>;
fn verify_snapshot(&self, snapshot_id: u64) -> StorageResult<bool>;
fn cleanup_snapshots(&self) -> StorageResult<usize>;
fn snapshot_stats(&self) -> SnapshotStats;
fn persistence_diagnostics(&self) -> Option<PersistenceDiagnostics>;
fn compact(&self, config: &CompactConfig) -> StorageResult<()>;
fn save_data_to_dir(&self, dir: &Path) -> StorageResult<()>;
fn should_flush(&self) -> bool;
fn should_checkpoint(&self) -> bool;
// Provided methods
fn save_data(&self) -> StorageResult<()> { ... }
fn auto_flush_if_needed(&self) -> StorageResult<bool> { ... }
fn auto_checkpoint_if_needed(
&self,
) -> StorageResult<Option<CheckpointStats>> { ... }
fn set_outbox_materialized_lsn_provider(
&self,
_provider: Arc<dyn Fn() -> StorageResult<Option<CommitLsn>> + Send + Sync>,
) { ... }
}Expand description
Persistence operations for flushing, checkpointing, and compaction.
Required Methods§
fn flush(&self) -> StorageResult<()>
fn create_checkpoint(&self) -> StorageResult<Option<CheckpointStats>>
fn verify_snapshot(&self, snapshot_id: u64) -> StorageResult<bool>
fn cleanup_snapshots(&self) -> StorageResult<usize>
fn snapshot_stats(&self) -> SnapshotStats
fn persistence_diagnostics(&self) -> Option<PersistenceDiagnostics>
fn compact(&self, config: &CompactConfig) -> StorageResult<()>
fn save_data_to_dir(&self, dir: &Path) -> StorageResult<()>
fn should_flush(&self) -> bool
fn should_checkpoint(&self) -> bool
Provided Methods§
fn save_data(&self) -> StorageResult<()>
fn auto_flush_if_needed(&self) -> StorageResult<bool>
fn auto_checkpoint_if_needed(&self) -> StorageResult<Option<CheckpointStats>>
fn set_outbox_materialized_lsn_provider( &self, _provider: Arc<dyn Fn() -> StorageResult<Option<CommitLsn>> + Send + Sync>, )
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".