Struct engine_rocks::RocksEngine [−][src]
Fields
db: Arc<DB>
Implementations
impl RocksEngine
[src]
pub fn from_db(db: Arc<DB>) -> Self
[src]
pub fn from_ref(db: &Arc<DB>) -> &Self
[src]
pub fn as_inner(&self) -> &Arc<DB>
[src]
pub fn get_sync_db(&self) -> Arc<DB>
[src]
pub fn exists(path: &str) -> bool
[src]
pub fn set_shared_block_cache(&mut self, enable: bool)
[src]
impl RocksEngine
[src]
fn is_titan(&self) -> bool
[src]
fn delete_all_in_range_cf_by_ingest(
&self,
cf: &str,
sst_path: String,
ranges: &[Range<'_>]
) -> Result<()>
[src]
&self,
cf: &str,
sst_path: String,
ranges: &[Range<'_>]
) -> Result<()>
fn delete_all_in_range_cf_by_key(
&self,
cf: &str,
range: &Range<'_>
) -> Result<()>
[src]
&self,
cf: &str,
range: &Range<'_>
) -> Result<()>
Trait Implementations
impl CFNamesExt for RocksEngine
[src]
impl CFOptionsExt for RocksEngine
[src]
type ColumnFamilyOptions = RocksColumnFamilyOptions
fn get_options_cf(&self, cf: &str) -> Result<Self::ColumnFamilyOptions>
[src]
fn set_options_cf(&self, cf: &str, options: &[(&str, &str)]) -> Result<()>
[src]
impl Clone for RocksEngine
[src]
fn clone(&self) -> RocksEngine
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl CompactExt for RocksEngine
[src]
type CompactedEvent = RocksCompactedEvent
fn auto_compactions_is_disabled(&self) -> Result<bool>
[src]
fn compact_range(
&self,
cf: &str,
start_key: Option<&[u8]>,
end_key: Option<&[u8]>,
exclusive_manual: bool,
max_subcompactions: u32
) -> Result<()>
[src]
&self,
cf: &str,
start_key: Option<&[u8]>,
end_key: Option<&[u8]>,
exclusive_manual: bool,
max_subcompactions: u32
) -> Result<()>
fn compact_files_in_range(
&self,
start: Option<&[u8]>,
end: Option<&[u8]>,
output_level: Option<i32>
) -> Result<()>
[src]
&self,
start: Option<&[u8]>,
end: Option<&[u8]>,
output_level: Option<i32>
) -> Result<()>
fn compact_files_in_range_cf(
&self,
cf: &str,
start: Option<&[u8]>,
end: Option<&[u8]>,
output_level: Option<i32>
) -> Result<()>
[src]
&self,
cf: &str,
start: Option<&[u8]>,
end: Option<&[u8]>,
output_level: Option<i32>
) -> Result<()>
fn compact_files_cf(
&self,
cf: &str,
files: Vec<String>,
output_level: Option<i32>,
max_subcompactions: u32,
exclude_l0: bool
) -> Result<()>
[src]
&self,
cf: &str,
files: Vec<String>,
output_level: Option<i32>,
max_subcompactions: u32,
exclude_l0: bool
) -> Result<()>
impl DBOptionsExt for RocksEngine
[src]
type DBOptions = RocksDBOptions
fn get_db_options(&self) -> Self::DBOptions
[src]
fn set_db_options(&self, options: &[(&str, &str)]) -> Result<()>
[src]
impl Debug for RocksEngine
[src]
impl ImportExt for RocksEngine
[src]
type IngestExternalFileOptions = RocksIngestExternalFileOptions
fn ingest_external_file_cf(
&self,
cf: &str,
opts: &Self::IngestExternalFileOptions,
files: &[&str]
) -> Result<()>
[src]
&self,
cf: &str,
opts: &Self::IngestExternalFileOptions,
files: &[&str]
) -> Result<()>
fn reset_global_seq<P: AsRef<Path>>(&self, cf: &str, path: P) -> Result<()>
[src]
impl Iterable for RocksEngine
[src]
type Iterator = RocksEngineIterator
fn iterator_opt(&self, opts: IterOptions) -> Result<Self::Iterator>
[src]
fn iterator_cf_opt(&self, cf: &str, opts: IterOptions) -> Result<Self::Iterator>
[src]
pub fn iterator(&self) -> Result<Self::Iterator, Error>
[src]
pub fn iterator_cf(&self, cf: &str) -> Result<Self::Iterator, Error>
[src]
pub fn scan<F>(
&self,
start_key: &[u8],
end_key: &[u8],
fill_cache: bool,
f: F
) -> Result<(), Error> where
F: FnMut(&[u8], &[u8]) -> Result<bool, Error>,
[src]
&self,
start_key: &[u8],
end_key: &[u8],
fill_cache: bool,
f: F
) -> Result<(), Error> where
F: FnMut(&[u8], &[u8]) -> Result<bool, Error>,
pub fn scan_cf<F>(
&self,
cf: &str,
start_key: &[u8],
end_key: &[u8],
fill_cache: bool,
f: F
) -> Result<(), Error> where
F: FnMut(&[u8], &[u8]) -> Result<bool, Error>,
[src]
&self,
cf: &str,
start_key: &[u8],
end_key: &[u8],
fill_cache: bool,
f: F
) -> Result<(), Error> where
F: FnMut(&[u8], &[u8]) -> Result<bool, Error>,
pub fn seek(
&self,
key: &[u8]
) -> Result<Option<(Vec<u8, Global>, Vec<u8, Global>)>, Error>
[src]
&self,
key: &[u8]
) -> Result<Option<(Vec<u8, Global>, Vec<u8, Global>)>, Error>
pub fn seek_cf(
&self,
cf: &str,
key: &[u8]
) -> Result<Option<(Vec<u8, Global>, Vec<u8, Global>)>, Error>
[src]
&self,
cf: &str,
key: &[u8]
) -> Result<Option<(Vec<u8, Global>, Vec<u8, Global>)>, Error>
impl KvEngine for RocksEngine
[src]
type Snapshot = RocksSnapshot
A consistent read-only snapshot of the database
fn snapshot(&self) -> RocksSnapshot
[src]
fn sync(&self) -> Result<()>
[src]
fn flush_metrics(&self, instance: &str)
[src]
fn reset_statistics(&self)
[src]
fn bad_downcast<T: 'static>(&self) -> &T
[src]
impl MiscExt for RocksEngine
[src]
fn flush(&self, sync: bool) -> Result<()>
[src]
fn flush_cf(&self, cf: &str, sync: bool) -> Result<()>
[src]
fn delete_ranges_cf(
&self,
cf: &str,
strategy: DeleteStrategy,
ranges: &[Range<'_>]
) -> Result<()>
[src]
&self,
cf: &str,
strategy: DeleteStrategy,
ranges: &[Range<'_>]
) -> Result<()>
fn get_approximate_memtable_stats_cf(
&self,
cf: &str,
range: &Range<'_>
) -> Result<(u64, u64)>
[src]
&self,
cf: &str,
range: &Range<'_>
) -> Result<(u64, u64)>
fn ingest_maybe_slowdown_writes(&self, cf: &str) -> Result<bool>
[src]
fn get_engine_used_size(&self) -> Result<u64>
[src]
fn roughly_cleanup_ranges(&self, ranges: &[(Vec<u8>, Vec<u8>)]) -> Result<()>
[src]
fn path(&self) -> &str
[src]
fn sync_wal(&self) -> Result<()>
[src]
fn exists(path: &str) -> bool
[src]
fn dump_stats(&self) -> Result<String>
[src]
fn get_latest_sequence_number(&self) -> u64
[src]
fn get_oldest_snapshot_sequence_number(&self) -> Option<u64>
[src]
fn get_total_sst_files_size_cf(&self, cf: &str) -> Result<Option<u64>>
[src]
fn get_range_entries_and_versions(
&self,
cf: &str,
start: &[u8],
end: &[u8]
) -> Result<Option<(u64, u64)>>
[src]
&self,
cf: &str,
start: &[u8],
end: &[u8]
) -> Result<Option<(u64, u64)>>
fn get_cf_num_files_at_level(
&self,
cf: &str,
level: usize
) -> Result<Option<u64>>
[src]
&self,
cf: &str,
level: usize
) -> Result<Option<u64>>
fn get_cf_num_immutable_mem_table(&self, cf: &str) -> Result<Option<u64>>
[src]
fn get_cf_compaction_pending_bytes(&self, cf: &str) -> Result<Option<u64>>
[src]
fn is_stalled_or_stopped(&self) -> bool
[src]
pub fn delete_all_in_range(
&self,
strategy: DeleteStrategy,
ranges: &[Range<'_>]
) -> Result<(), Error>
[src]
&self,
strategy: DeleteStrategy,
ranges: &[Range<'_>]
) -> Result<(), Error>
impl MvccPropertiesExt for RocksEngine
[src]
fn get_mvcc_properties_cf(
&self,
cf: &str,
safe_point: TimeStamp,
start_key: &[u8],
end_key: &[u8]
) -> Option<MvccProperties>
[src]
&self,
cf: &str,
safe_point: TimeStamp,
start_key: &[u8],
end_key: &[u8]
) -> Option<MvccProperties>
impl Peekable for RocksEngine
[src]
type DBVector = RocksDBVector
The byte-vector type through which the database returns read values.
fn get_value_opt(
&self,
opts: &ReadOptions,
key: &[u8]
) -> Result<Option<RocksDBVector>>
[src]
&self,
opts: &ReadOptions,
key: &[u8]
) -> Result<Option<RocksDBVector>>
fn get_value_cf_opt(
&self,
opts: &ReadOptions,
cf: &str,
key: &[u8]
) -> Result<Option<RocksDBVector>>
[src]
&self,
opts: &ReadOptions,
cf: &str,
key: &[u8]
) -> Result<Option<RocksDBVector>>
pub fn get_value(&self, key: &[u8]) -> Result<Option<Self::DBVector>, Error>
[src]
pub fn get_value_cf(
&self,
cf: &str,
key: &[u8]
) -> Result<Option<Self::DBVector>, Error>
[src]
&self,
cf: &str,
key: &[u8]
) -> Result<Option<Self::DBVector>, Error>
pub fn get_msg<M>(&self, key: &[u8]) -> Result<Option<M>, Error> where
M: Message + Default,
[src]
M: Message + Default,
pub fn get_msg_cf<M>(&self, cf: &str, key: &[u8]) -> Result<Option<M>, Error> where
M: Message + Default,
[src]
M: Message + Default,
impl PerfContextExt for RocksEngine
[src]
type PerfContext = RocksPerfContext
fn get_perf_context(
&self,
level: PerfLevel,
kind: PerfContextKind
) -> Self::PerfContext
[src]
&self,
level: PerfLevel,
kind: PerfContextKind
) -> Self::PerfContext
impl RaftEngine for RocksEngine
[src]
type LogBatch = RocksWriteBatch
fn log_batch(&self, capacity: usize) -> Self::LogBatch
[src]
fn sync(&self) -> Result<()>
[src]
fn get_raft_state(&self, raft_group_id: u64) -> Result<Option<RaftLocalState>>
[src]
fn get_entry(&self, raft_group_id: u64, index: u64) -> Result<Option<Entry>>
[src]
fn fetch_entries_to(
&self,
region_id: u64,
low: u64,
high: u64,
max_size: Option<usize>,
buf: &mut Vec<Entry>
) -> Result<usize>
[src]
&self,
region_id: u64,
low: u64,
high: u64,
max_size: Option<usize>,
buf: &mut Vec<Entry>
) -> Result<usize>
fn consume(&self, batch: &mut Self::LogBatch, sync_log: bool) -> Result<usize>
[src]
fn consume_and_shrink(
&self,
batch: &mut Self::LogBatch,
sync_log: bool,
max_capacity: usize,
shrink_to: usize
) -> Result<usize>
[src]
&self,
batch: &mut Self::LogBatch,
sync_log: bool,
max_capacity: usize,
shrink_to: usize
) -> Result<usize>
fn clean(
&self,
raft_group_id: u64,
state: &RaftLocalState,
batch: &mut Self::LogBatch
) -> Result<()>
[src]
&self,
raft_group_id: u64,
state: &RaftLocalState,
batch: &mut Self::LogBatch
) -> Result<()>
fn append(&self, raft_group_id: u64, entries: Vec<Entry>) -> Result<usize>
[src]
fn put_raft_state(
&self,
raft_group_id: u64,
state: &RaftLocalState
) -> Result<()>
[src]
&self,
raft_group_id: u64,
state: &RaftLocalState
) -> Result<()>
fn gc(&self, raft_group_id: u64, from: u64, to: u64) -> Result<usize>
[src]
fn purge_expired_files(&self) -> Result<Vec<u64>>
[src]
fn has_builtin_entry_cache(&self) -> bool
[src]
fn flush_metrics(&self, instance: &str)
[src]
fn reset_statistics(&self)
[src]
fn dump_stats(&self) -> Result<String>
[src]
pub fn gc_entry_cache(&self, _raft_group_id: u64, _to: u64)
[src]
pub fn flush_stats(&self) -> Option<CacheStats>
[src]
pub fn stop(&self)
[src]
impl RangePropertiesExt for RocksEngine
[src]
fn get_range_approximate_keys(
&self,
range: Range<'_>,
large_threshold: u64
) -> Result<u64>
[src]
&self,
range: Range<'_>,
large_threshold: u64
) -> Result<u64>
fn get_range_approximate_keys_cf(
&self,
cfname: &str,
range: Range<'_>,
large_threshold: u64
) -> Result<u64>
[src]
&self,
cfname: &str,
range: Range<'_>,
large_threshold: u64
) -> Result<u64>
fn get_range_approximate_size(
&self,
range: Range<'_>,
large_threshold: u64
) -> Result<u64>
[src]
&self,
range: Range<'_>,
large_threshold: u64
) -> Result<u64>
fn get_range_approximate_size_cf(
&self,
cfname: &str,
range: Range<'_>,
large_threshold: u64
) -> Result<u64>
[src]
&self,
cfname: &str,
range: Range<'_>,
large_threshold: u64
) -> Result<u64>
fn get_range_approximate_split_keys(
&self,
range: Range<'_>,
key_count: usize
) -> Result<Vec<Vec<u8>>>
[src]
&self,
range: Range<'_>,
key_count: usize
) -> Result<Vec<Vec<u8>>>
fn get_range_approximate_split_keys_cf(
&self,
cfname: &str,
range: Range<'_>,
key_count: usize
) -> Result<Vec<Vec<u8>>>
[src]
&self,
cfname: &str,
range: Range<'_>,
key_count: usize
) -> Result<Vec<Vec<u8>>>
impl SstExt for RocksEngine
[src]
type SstReader = RocksSstReader
type SstWriter = RocksSstWriter
type SstWriterBuilder = RocksSstWriterBuilder
impl SstWriterBuilder<RocksEngine> for RocksSstWriterBuilder
[src]
fn new() -> Self
[src]
fn set_db(self, db: &RocksEngine) -> Self
[src]
fn set_cf(self, cf: &str) -> Self
[src]
fn set_in_memory(self, in_memory: bool) -> Self
[src]
fn set_compression_type(self, compression: Option<SstCompressionType>) -> Self
[src]
fn set_compression_level(self, level: i32) -> Self
[src]
fn build(self, path: &str) -> Result<RocksSstWriter>
[src]
impl SyncMutable for RocksEngine
[src]
fn put(&self, key: &[u8], value: &[u8]) -> Result<()>
[src]
fn put_cf(&self, cf: &str, key: &[u8], value: &[u8]) -> Result<()>
[src]
fn delete(&self, key: &[u8]) -> Result<()>
[src]
fn delete_cf(&self, cf: &str, key: &[u8]) -> Result<()>
[src]
fn delete_range(&self, begin_key: &[u8], end_key: &[u8]) -> Result<()>
[src]
fn delete_range_cf(
&self,
cf: &str,
begin_key: &[u8],
end_key: &[u8]
) -> Result<()>
[src]
&self,
cf: &str,
begin_key: &[u8],
end_key: &[u8]
) -> Result<()>
pub fn put_msg<M>(&self, key: &[u8], m: &M) -> Result<(), Error> where
M: Message,
[src]
M: Message,
pub fn put_msg_cf<M>(&self, cf: &str, key: &[u8], m: &M) -> Result<(), Error> where
M: Message,
[src]
M: Message,
impl TablePropertiesExt for RocksEngine
[src]
type TablePropertiesCollection = RocksTablePropertiesCollection
type TablePropertiesCollectionIter = RocksTablePropertiesCollectionIter
type TablePropertiesKey = RocksTablePropertiesKey
type TableProperties = RocksTableProperties
type UserCollectedProperties = RocksUserCollectedProperties
fn get_properties_of_tables_in_range(
&self,
cf: &str,
ranges: &[Range<'_>]
) -> Result<Self::TablePropertiesCollection>
[src]
&self,
cf: &str,
ranges: &[Range<'_>]
) -> Result<Self::TablePropertiesCollection>
pub fn get_range_properties_cf(
&self,
cfname: &str,
start_key: &[u8],
end_key: &[u8]
) -> Result<Self::TablePropertiesCollection, Error>
[src]
&self,
cfname: &str,
start_key: &[u8],
end_key: &[u8]
) -> Result<Self::TablePropertiesCollection, Error>
impl TtlPropertiesExt for RocksEngine
[src]
fn get_range_ttl_properties_cf(
&self,
cf: &str,
start_key: &[u8],
end_key: &[u8]
) -> Result<Vec<(String, TtlProperties)>>
[src]
&self,
cf: &str,
start_key: &[u8],
end_key: &[u8]
) -> Result<Vec<(String, TtlProperties)>>
impl WriteBatch<RocksEngine> for RocksWriteBatch
[src]
fn with_capacity(e: &RocksEngine, cap: usize) -> RocksWriteBatch
[src]
fn write_opt(&self, opts: &WriteOptions) -> Result<()>
[src]
fn data_size(&self) -> usize
[src]
fn count(&self) -> usize
[src]
fn is_empty(&self) -> bool
[src]
fn should_write_to_engine(&self) -> bool
[src]
fn clear(&mut self)
[src]
fn set_save_point(&mut self)
[src]
fn pop_save_point(&mut self) -> Result<()>
[src]
fn rollback_to_save_point(&mut self) -> Result<()>
[src]
pub fn write(&self) -> Result<(), Error>
[src]
impl WriteBatch<RocksEngine> for RocksWriteBatchVec
[src]
fn with_capacity(e: &RocksEngine, cap: usize) -> RocksWriteBatchVec
[src]
fn write_opt(&self, opts: &WriteOptions) -> Result<()>
[src]
fn data_size(&self) -> usize
[src]
fn count(&self) -> usize
[src]
fn is_empty(&self) -> bool
[src]
fn should_write_to_engine(&self) -> bool
[src]
fn clear(&mut self)
[src]
fn set_save_point(&mut self)
[src]
fn pop_save_point(&mut self) -> Result<()>
[src]
fn rollback_to_save_point(&mut self) -> Result<()>
[src]
pub fn write(&self) -> Result<(), Error>
[src]
impl WriteBatchExt for RocksEngine
[src]
type WriteBatch = RocksWriteBatch
type WriteBatchVec = RocksWriteBatchVec
WriteBatchVec
is used for multi_batch_write
of RocksEngine and other Engine could also
implement another kind of WriteBatch according to their needs. Read more
const WRITE_BATCH_MAX_KEYS: usize
[src]
fn support_write_batch_vec(&self) -> bool
[src]
fn write_batch(&self) -> Self::WriteBatch
[src]
fn write_batch_with_cap(&self, cap: usize) -> Self::WriteBatch
[src]
Auto Trait Implementations
impl RefUnwindSafe for RocksEngine
impl Send for RocksEngine
impl Sync for RocksEngine
impl Unpin for RocksEngine
impl UnwindSafe for RocksEngine
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,