Trait engine_traits::engine::KvEngine[][src]

pub trait KvEngine: Peekable + SyncMutable + Iterable + WriteBatchExt + DBOptionsExt + CFNamesExt + CFOptionsExt + ImportExt + SstExt + TablePropertiesExt + CompactExt + RangePropertiesExt + MvccPropertiesExt + TtlPropertiesExt + PerfContextExt + MiscExt + Send + Sync + Clone + Debug + Unpin + 'static {
    type Snapshot: Snapshot;
    fn snapshot(&self) -> Self::Snapshot;
fn sync(&self) -> Result<()>;
fn bad_downcast<T: 'static>(&self) -> &T; fn flush_metrics(&self, _instance: &str) { ... }
fn reset_statistics(&self) { ... } }
[]

A TiKV key-value store

Associated Types

type Snapshot: Snapshot[src][]

A consistent read-only snapshot of the database

Required methods

fn snapshot(&self) -> Self::Snapshot[src][]

Create a snapshot

fn sync(&self) -> Result<()>[src][]

Syncs any writes to disk

fn bad_downcast<T: 'static>(&self) -> &T[src][]

Cast to a concrete engine type

This only exists as a temporary hack during refactoring. It cannot be used forever.

Provided methods

fn flush_metrics(&self, _instance: &str)[src][]

Flush metrics to prometheus

instance is the label of the metric to flush.

fn reset_statistics(&self)[src][]

Reset internal statistics

Implementors

impl KvEngine for PanicEngine

impl KvEngine for RocksEngine