Trait rocksdb::CompactionFilter [−][src]
CompactionFilter
allows an application to modify/delete a key-value at
the time of compaction.
For more details, Please checkout rocksdb’s documentation.
Provided methods
fn filter(
&mut self,
_level: usize,
_key: &[u8],
_value: &[u8],
_new_value: &mut Vec<u8>,
_value_changed: &mut bool
) -> bool
[src]
&mut self,
_level: usize,
_key: &[u8],
_value: &[u8],
_new_value: &mut Vec<u8>,
_value_changed: &mut bool
) -> bool
The compaction process invokes this method for kv that is being compacted. A return value of false indicates that the kv should be preserved in the output of this compaction run and a return value of true indicates that this key-value should be removed from the output of the compaction. The application can inspect the existing value of the key and make decision based on it.
fn featured_filter(
&mut self,
level: usize,
key: &[u8],
_seqno: u64,
value: &[u8],
value_type: CompactionFilterValueType
) -> CompactionFilterDecision
[src]
&mut self,
level: usize,
key: &[u8],
_seqno: u64,
value: &[u8],
value_type: CompactionFilterValueType
) -> CompactionFilterDecision
This method will overwrite filter
if a CompactionFilter
implements both of them.