|
| 1 | +from libcpp cimport bool as cpp_bool |
| 2 | +from libcpp.string cimport string |
| 3 | +from libcpp.vector cimport vector |
| 4 | +from libc.stdint cimport uint64_t |
| 5 | +from libc.stdint cimport uint32_t |
| 6 | +from libc.stdint cimport int64_t |
| 7 | +from libc.stdint cimport int32_t |
| 8 | +from .std_memory cimport shared_ptr |
| 9 | +from .comparator cimport Comparator |
| 10 | +from .merge_operator cimport MergeOperator |
| 11 | +from .logger cimport Logger |
| 12 | +from .slice_ cimport Slice |
| 13 | +from .snapshot cimport Snapshot |
| 14 | +from .slice_transform cimport SliceTransform |
| 15 | +from .table_factory cimport TableFactory |
| 16 | +from .memtablerep cimport MemTableRepFactory |
| 17 | +from .universal_compaction cimport CompactionOptionsUniversal |
| 18 | +from .cache cimport Cache |
| 19 | +from .options cimport Options |
| 20 | +from .options cimport CompressionType |
| 21 | +from .table_properties cimport TablePropertiesCollectorFactory |
| 22 | + |
| 23 | +cdef extern from "rocksdb/advanced_options.h" namespace "rocksdb": |
| 24 | + ctypedef enum CompactionStyle: |
| 25 | + kCompactionStyleLevel |
| 26 | + kCompactionStyleUniversal |
| 27 | + kCompactionStyleFIFO |
| 28 | + kCompactionStyleNone |
| 29 | + |
| 30 | + ctypedef enum CompactionPri: |
| 31 | + kByCompensatedSize |
| 32 | + kOldestLargestSeqFirst |
| 33 | + kOldestSmallestSeqFirst |
| 34 | + kMinOverlappingRatio |
| 35 | + |
| 36 | + cdef cppclass CompactionOptionsFIFO: |
| 37 | + uint64_t max_table_files_size |
| 38 | + cpp_bool allow_compaction |
| 39 | + CompactionOptionsFIFO() |
| 40 | + CompactionOptionsFIFO(uint64_t, cpp_bool) |
| 41 | + |
| 42 | + cdef cppclass CompressionOptions: |
| 43 | + int window_bits; |
| 44 | + int level; |
| 45 | + int strategy; |
| 46 | + uint32_t max_dict_bytes |
| 47 | + uint32_t zstd_max_train_bytes |
| 48 | + uint32_t parallel_threads |
| 49 | + cpp_bool enabled |
| 50 | + CompressionOptions() except + |
| 51 | + CompressionOptions(int, int, int, int, |
| 52 | + int, int, cpp_bool) except + |
| 53 | + |
| 54 | + cdef enum UpdateStatus: |
| 55 | + UPDATE_FAILED |
| 56 | + UPDATED_INPLACE |
| 57 | + UPDATED |
| 58 | + |
| 59 | + cdef cppclass AdvancedColumnFamilyOptions: |
| 60 | + int max_write_buffer_number |
| 61 | + int min_write_buffer_number_to_merge |
| 62 | + int max_write_buffer_number_to_maintain |
| 63 | + int64_t max_write_buffer_size_to_maintain |
| 64 | + cpp_bool inplace_update_support |
| 65 | + size_t inplace_update_num_locks |
| 66 | + |
| 67 | + UpdateStatus (*inplace_callback)(char*, |
| 68 | + uint32_t*, |
| 69 | + Slice, |
| 70 | + string*) |
| 71 | + double memtable_prefix_bloom_size_ratio |
| 72 | + cpp_bool memtable_whole_key_filtering |
| 73 | + size_t memtable_huge_page_size |
| 74 | + shared_ptr[const SliceTransform] memtable_insert_with_hint_prefix_extractor |
| 75 | + uint32_t bloom_locality |
| 76 | + size_t arena_block_size |
| 77 | + vector[CompressionType] compression_per_level |
| 78 | + int num_levels |
| 79 | + int level0_slowdown_writes_trigger |
| 80 | + int level0_stop_writes_trigger |
| 81 | + uint64_t target_file_size_base |
| 82 | + int target_file_size_multiplier |
| 83 | + cpp_bool level_compaction_dynamic_level_bytes |
| 84 | + double max_bytes_for_level_multiplier |
| 85 | + |
| 86 | + vector[int] max_bytes_for_level_multiplier_additional |
| 87 | + uint64_t max_compaction_bytes |
| 88 | + uint64_t soft_pending_compaction_bytes_limit |
| 89 | + uint64_t hard_pending_compaction_bytes_limit |
| 90 | + |
| 91 | + CompactionStyle compaction_style |
| 92 | + CompactionPri compaction_pri |
| 93 | + CompactionOptionsUniversal compaction_options_universal |
| 94 | + |
| 95 | + CompactionOptionsFIFO compaction_options_fifo |
| 96 | + |
| 97 | + uint64_t max_sequential_skip_in_iterations |
| 98 | + shared_ptr[MemTableRepFactory] memtable_factory |
| 99 | + vector[shared_ptr[TablePropertiesCollectorFactory]] table_properties_collector_factories |
| 100 | + |
| 101 | + size_t max_successive_merges |
| 102 | + cpp_bool optimize_filters_for_hits |
| 103 | + |
| 104 | + cpp_bool paranoid_file_checks |
| 105 | + cpp_bool force_consistency_checks |
| 106 | + |
| 107 | + cpp_bool report_bg_io_stats |
| 108 | + uint64_t ttl |
| 109 | + |
| 110 | + uint64_t periodic_compaction_seconds |
| 111 | + uint64_t sample_for_compression |
| 112 | + |
| 113 | + AdvancedColumnFamilyOptions(); |
| 114 | + AdvancedColumnFamilyOptions(const Options&); |
| 115 | + # ---------------- OPTIONS NOT SUPPORTED ANYMORE ---------------- |
| 116 | + # But kept for compatibality as they are still in the header files. |
| 117 | + int max_mem_compaction_level |
| 118 | + double soft_rate_limit |
| 119 | + double hard_rate_limit |
| 120 | + unsigned int rate_limit_delay_max_milliseconds |
| 121 | + cpp_bool purge_redundant_kvs_while_flush |
0 commit comments