pub trait EventListener: Sync + Send {
    fn post_new_log_file(&self, _file_id: FileId) { ... }
    fn on_append_log_file(&self, _handle: FileBlockHandle) { ... }
    fn post_apply_memtables(&self, _file_id: FileId) { ... }
    fn first_file_not_ready_for_purge(&self, _queue: LogQueue) -> Option<FileSeq> { ... }
    fn post_purge(&self, _file_id: FileId) { ... }
}
Expand description

EventListener contains a set of callback functions that will be notified on specific events inside Raft Engine.

Threading

Different callbacks are called under different threading contexts. on_append_log_file, for example, will be called under a global lock of one specific queue.

Provided Methods

Called after a new log file is created.

Called before a LogBatch has been written into a log file.

Called after a LogBatch has been applied to the MemTable.

Returns the oldest file sequence number that are not ready to be purged.

Called after a log file is purged.

Implementors