Struct test_storage::sync_storage::SyncTestStorage[][src]

pub struct SyncTestStorage<E: Engine> {
    gc_worker: GcWorker<E, RaftStoreBlackHole>,
    store: Storage<E, DummyLockManager>,
}

A Storage like structure with sync API.

Only used for test purpose.

Fields

gc_worker: GcWorker<E, RaftStoreBlackHole>store: Storage<E, DummyLockManager>

Implementations

impl<E: Engine> SyncTestStorage<E>[src]

pub fn start_auto_gc<S: GcSafePointProvider, R: RegionInfoProvider + Clone + 'static>(
    &mut self,
    cfg: AutoGcConfig<S, R>
)
[src]

pub fn get_storage(&self) -> Storage<E, DummyLockManager>[src]

pub fn get_engine(&self) -> E[src]

pub fn get(
    &self,
    ctx: Context,
    key: &Key,
    start_ts: impl Into<TimeStamp>
) -> Result<(Option<Value>, Statistics, PerfStatisticsDelta)>
[src]

pub fn batch_get(
    &self,
    ctx: Context,
    keys: &[Key],
    start_ts: impl Into<TimeStamp>
) -> Result<(Vec<Result<KvPair>>, Statistics, PerfStatisticsDelta)>
[src]

pub fn batch_get_command(
    &self,
    ctx: Context,
    keys: &[&[u8]],
    start_ts: u64
) -> Result<Vec<Option<Vec<u8>>>>
[src]

pub fn scan(
    &self,
    ctx: Context,
    start_key: Key,
    end_key: Option<Key>,
    limit: usize,
    key_only: bool,
    start_ts: impl Into<TimeStamp>
) -> Result<Vec<Result<KvPair>>>
[src]

pub fn reverse_scan(
    &self,
    ctx: Context,
    start_key: Key,
    end_key: Option<Key>,
    limit: usize,
    key_only: bool,
    start_ts: impl Into<TimeStamp>
) -> Result<Vec<Result<KvPair>>>
[src]

pub fn prewrite(
    &self,
    ctx: Context,
    mutations: Vec<Mutation>,
    primary: Vec<u8>,
    start_ts: impl Into<TimeStamp>
) -> Result<PrewriteResult>
[src]

pub fn commit(
    &self,
    ctx: Context,
    keys: Vec<Key>,
    start_ts: impl Into<TimeStamp>,
    commit_ts: impl Into<TimeStamp>
) -> Result<TxnStatus>
[src]

pub fn cleanup(
    &self,
    ctx: Context,
    key: Key,
    start_ts: impl Into<TimeStamp>,
    current_ts: impl Into<TimeStamp>
) -> Result<()>
[src]

pub fn rollback(
    &self,
    ctx: Context,
    keys: Vec<Key>,
    start_ts: impl Into<TimeStamp>
) -> Result<()>
[src]

pub fn scan_locks(
    &self,
    ctx: Context,
    max_ts: impl Into<TimeStamp>,
    start_key: Option<Key>,
    end_key: Option<Key>,
    limit: usize
) -> Result<Vec<LockInfo>>
[src]

pub fn resolve_lock(
    &self,
    ctx: Context,
    start_ts: impl Into<TimeStamp>,
    commit_ts: Option<impl Into<TimeStamp>>
) -> Result<()>
[src]

pub fn resolve_lock_batch(
    &self,
    ctx: Context,
    txns: Vec<(TimeStamp, TimeStamp)>
) -> Result<()>
[src]

pub fn gc(&self, _: Context, safe_point: impl Into<TimeStamp>) -> Result<()>[src]

pub fn raw_get(
    &self,
    ctx: Context,
    cf: String,
    key: Vec<u8>
) -> Result<Option<Vec<u8>>>
[src]

pub fn raw_put(
    &self,
    ctx: Context,
    cf: String,
    key: Vec<u8>,
    value: Vec<u8>
) -> Result<()>
[src]

pub fn raw_delete(&self, ctx: Context, cf: String, key: Vec<u8>) -> Result<()>[src]

pub fn raw_scan(
    &self,
    ctx: Context,
    cf: String,
    start_key: Vec<u8>,
    end_key: Option<Vec<u8>>,
    limit: usize
) -> Result<Vec<Result<KvPair>>>
[src]

pub fn reverse_raw_scan(
    &self,
    ctx: Context,
    cf: String,
    start_key: Vec<u8>,
    end_key: Option<Vec<u8>>,
    limit: usize
) -> Result<Vec<Result<KvPair>>>
[src]

pub fn raw_compare_and_swap_atomic(
    &self,
    ctx: Context,
    cf: String,
    key: Vec<u8>,
    previous_value: Option<Vec<u8>>,
    value: Vec<u8>,
    ttl: u64
) -> Result<(Option<Vec<u8>>, bool)>
[src]

pub fn raw_batch_put_atomic(
    &self,
    ctx: Context,
    cf: String,
    pairs: Vec<KvPair>,
    ttl: u64
) -> Result<()>
[src]

pub fn raw_batch_delete_atomic(
    &self,
    ctx: Context,
    cf: String,
    keys: Vec<Vec<u8>>
) -> Result<()>
[src]

Trait Implementations

impl<E: Clone + Engine> Clone for SyncTestStorage<E>[src]

Auto Trait Implementations

impl<E> !RefUnwindSafe for SyncTestStorage<E>

impl<E> Send for SyncTestStorage<E>

impl<E> Sync for SyncTestStorage<E> where
    E: Sync

impl<E> Unpin for SyncTestStorage<E> where
    E: Unpin

impl<E> !UnwindSafe for SyncTestStorage<E>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<V, W> ConvertFrom<W> for V where
    W: ConvertTo<V>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]