Skip to main content

StoragePersistenceOps

Trait StoragePersistenceOps 

Source
pub trait StoragePersistenceOps:
    Send
    + Sync
    + Debug {
Show 14 methods // Required methods fn flush(&self) -> Result<(), StorageError>; fn create_checkpoint(&self) -> Result<Option<CheckpointStats>, StorageError>; fn verify_snapshot(&self, snapshot_id: u64) -> Result<bool, StorageError>; fn cleanup_snapshots(&self) -> Result<usize, StorageError>; fn snapshot_stats(&self) -> SnapshotStats; fn persistence_diagnostics(&self) -> Option<PersistenceDiagnostics>; fn compact(&self, config: &CompactConfig) -> Result<(), StorageError>; fn save_data_to_dir(&self, dir: &Path) -> Result<(), StorageError>; fn should_flush(&self) -> bool; fn should_checkpoint(&self) -> bool; // Provided methods fn save_data(&self) -> Result<(), StorageError> { ... } fn auto_flush_if_needed(&self) -> Result<bool, StorageError> { ... } fn auto_checkpoint_if_needed( &self, ) -> Result<Option<CheckpointStats>, StorageError> { ... } fn set_outbox_materialized_lsn_provider( &self, _provider: Arc<dyn Fn() -> Result<Option<CommitLsn>, StorageError> + Send + Sync>, ) { ... }
}
Expand description

Persistence operations for flushing, checkpointing, and compaction.

Required Methods§

Provided Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§