forked from mirror/ledisdb
add some rocksdb option
This commit is contained in:
parent
84eae31987
commit
4646ea7ec3
|
@ -97,6 +97,10 @@ func (o *Options) SetFilterPolicy(fp *FilterPolicy) {
|
|||
C.rocksdb_options_set_filter_policy(o.Opt, policy)
|
||||
}
|
||||
|
||||
func (o *Options) SetMaxWriteBufferNumber(n int) {
|
||||
C.rocksdb_options_set_max_write_buffer_number(o.Opt, C.int(n))
|
||||
}
|
||||
|
||||
func (o *Options) SetMaxBackgroundCompactions(n int) {
|
||||
C.rocksdb_options_set_max_background_compactions(o.Opt, C.int(n))
|
||||
}
|
||||
|
@ -105,6 +109,14 @@ func (o *Options) SetMaxBackgroundFlushes(n int) {
|
|||
C.rocksdb_options_set_max_background_flushes(o.Opt, C.int(n))
|
||||
}
|
||||
|
||||
func (o *Options) SetNumLevels(n int) {
|
||||
C.rocksdb_options_set_num_levels(o.Opt, C.int(n))
|
||||
}
|
||||
|
||||
func (o *Options) SetLevel0FileNumCompactionTrigger(n int) {
|
||||
C.rocksdb_options_set_level0_file_num_compaction_trigger(o.Opt, C.int(n))
|
||||
}
|
||||
|
||||
func (o *Options) SetLevel0SlowdownWritesTrigger(n int) {
|
||||
C.rocksdb_options_set_level0_slowdown_writes_trigger(o.Opt, C.int(n))
|
||||
}
|
||||
|
@ -117,6 +129,18 @@ func (o *Options) SetTargetFileSizeBase(n int) {
|
|||
C.rocksdb_options_set_target_file_size_base(o.Opt, C.uint64_t(uint64(n)))
|
||||
}
|
||||
|
||||
func (o *Options) SetTargetFileSizeMultiplier(n int) {
|
||||
C.rocksdb_options_set_target_file_size_multiplier(o.Opt, C.int(n))
|
||||
}
|
||||
|
||||
func (o *Options) SetMaxBytesForLevelBase(n int) {
|
||||
C.rocksdb_options_set_max_bytes_for_level_base(o.Opt, C.int(n))
|
||||
}
|
||||
|
||||
func (o *Options) SetMaxBytesForLevelMultiplier(n int) {
|
||||
C.rocksdb_options_set_max_bytes_for_level_multiplier(o.Opt, C.int(n))
|
||||
}
|
||||
|
||||
func (ro *ReadOptions) Close() {
|
||||
C.rocksdb_readoptions_destroy(ro.Opt)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue