[][src]Trait rexrocksdb::TablePropertiesCollector

pub trait TablePropertiesCollector {
    fn add(
        &mut self,
        key: &[u8],
        value: &[u8],
        entry_type: DBEntryType,
        seq: u64,
        file_size: u64
    );
fn finish(&mut self) -> HashMap<Vec<u8>, Vec<u8>>; }

TablePropertiesCollector provides the mechanism for users to collect their own properties that they are interested in. This class is essentially a collection of callback functions that will be invoked during table building. It is constructed with TablePropertiesCollectorFactory. The methods don't need to be thread-safe, as we will create exactly one TablePropertiesCollector object per table and then call it sequentially

Required methods

fn add(
    &mut self,
    key: &[u8],
    value: &[u8],
    entry_type: DBEntryType,
    seq: u64,
    file_size: u64
)

Will be called when a new key/value pair is inserted into the table.

fn finish(&mut self) -> HashMap<Vec<u8>, Vec<u8>>

Will be called when a table has already been built and is ready for writing the properties block.

Loading content...

Implementors

Loading content...