Trait engine_rocks::raw::EventListener[][src]

pub trait EventListener: Send + Sync {
    pub fn on_flush_begin(&self, &FlushJobInfo) { ... }
pub fn on_flush_completed(&self, &FlushJobInfo) { ... }
pub fn on_compaction_begin(&self, &CompactionJobInfo) { ... }
pub fn on_compaction_completed(&self, &CompactionJobInfo) { ... }
pub fn on_subcompaction_begin(&self, &SubcompactionJobInfo) { ... }
pub fn on_subcompaction_completed(&self, &SubcompactionJobInfo) { ... }
pub fn on_external_file_ingested(&self, &IngestionInfo) { ... }
pub fn on_background_error(
        &self,
        DBBackgroundErrorReason,
        Result<(), String>
    ) { ... }
pub fn on_stall_conditions_changed(&self, &WriteStallInfo) { ... } }

EventListener trait contains a set of call-back functions that will be called when specific RocksDB event happens such as flush. It can be used as a building block for developing custom features such as stats-collector or external compaction algorithm.

Note that call-back functions should not run for an extended period of time before the function returns, otherwise RocksDB may be blocked. For more information, please see doc of rocksdb.

Provided methods

pub fn on_flush_begin(&self, &FlushJobInfo)[src]

pub fn on_flush_completed(&self, &FlushJobInfo)[src]

pub fn on_compaction_begin(&self, &CompactionJobInfo)[src]

pub fn on_compaction_completed(&self, &CompactionJobInfo)[src]

pub fn on_subcompaction_begin(&self, &SubcompactionJobInfo)[src]

pub fn on_subcompaction_completed(&self, &SubcompactionJobInfo)[src]

pub fn on_external_file_ingested(&self, &IngestionInfo)[src]

pub fn on_background_error(&self, DBBackgroundErrorReason, Result<(), String>)[src]

pub fn on_stall_conditions_changed(&self, &WriteStallInfo)[src]

Loading content...

Implementors

impl EventListener for CompactionListener[src]

impl EventListener for RocksEventListener[src]

Loading content...