add allow os buffer conf

master
Jay Lee 9 years ago committed by Karl Hobley
parent f92f15f111
commit f781adc84b
  1. 1
      src/ffi.rs
  2. 7
      src/rocksdb_options.rs

@ -147,6 +147,7 @@ extern "C" {
pub fn rocksdb_options_set_bytes_per_sync(options: DBOptions, bytes: u64);
pub fn rocksdb_options_set_disable_data_sync(options: DBOptions,
v: c_int);
pub fn rocksdb_options_set_allow_os_buffer(options: DBOptions, is_allow: bool);
pub fn rocksdb_options_optimize_for_point_lookup(options: DBOptions,
block_cache_size_mb: u64);
pub fn rocksdb_options_set_table_cache_numshardbits(options: DBOptions,

@ -195,6 +195,13 @@ impl Options {
}
}
pub fn allow_os_buffer(&mut self, is_allow: bool) {
unsafe {
rocksdb_ffi::rocksdb_options_set_allow_os_buffer(self.inner,
is_allow);
}
}
pub fn set_table_cache_num_shard_bits(&mut self, nbits: c_int) {
unsafe {
rocksdb_ffi::rocksdb_options_set_table_cache_numshardbits(self.inner,

Loading…
Cancel
Save