FilePurger

Trait FilePurger 

Source
pub trait FilePurger:
    Send
    + Sync
    + Debug {
    // Required method
    fn remove_file(
        &self,
        file_meta: FileMeta,
        is_delete: bool,
        index_outdated: bool,
    );

    // Provided method
    fn new_file(&self, _: &FileMeta) { ... }
}
Expand description

A worker to delete files in background.

Required Methods§

Source

fn remove_file( &self, file_meta: FileMeta, is_delete: bool, index_outdated: bool, )

Send a request to remove the file. If is_delete is true, the file will be deleted from the storage. Otherwise, only the reference will be removed. If index_outdated is true, the index file will be deleted regardless of is_delete.

Provided Methods§

Source

fn new_file(&self, _: &FileMeta)

Notify the purger of a new file created. This is useful for object store based storage, where we need to track the file references The default implementation is a no-op.

Implementors§