Struct tikv::server::raftkv::RaftKv[][src]

pub struct RaftKv<E, S> where
    E: KvEngine,
    S: RaftStoreRouter<E> + LocalReadRouter<E> + 'static, 
{ router: S, engine: E, txn_extra_scheduler: Option<Arc<dyn TxnExtraScheduler>>, }

RaftKv is a storage engine base on RaftStore.

Fields

router: Sengine: Etxn_extra_scheduler: Option<Arc<dyn TxnExtraScheduler>>

Implementations

impl<E, S> RaftKv<E, S> where
    E: KvEngine,
    S: RaftStoreRouter<E> + LocalReadRouter<E> + 'static, 
[src]

pub fn new(router: S, engine: E) -> RaftKv<E, S>[src]

Create a RaftKv using specified configuration.

pub fn set_txn_extra_scheduler(
    &mut self,
    txn_extra_scheduler: Arc<dyn TxnExtraScheduler>
)
[src]

fn new_request_header(&self, ctx: &Context) -> RaftRequestHeader[src]

fn exec_snapshot(
    &self,
    ctx: SnapContext<'_>,
    req: Request,
    cb: Callback<CmdRes<E::Snapshot>>
) -> Result<()>
[src]

fn exec_write_requests(
    &self,
    ctx: &Context,
    batch: WriteData,
    write_cb: Callback<CmdRes<E::Snapshot>>,
    proposed_cb: Option<ExtCallback>,
    committed_cb: Option<ExtCallback>
) -> Result<()>
[src]

Trait Implementations

impl<E: Clone, S: Clone> Clone for RaftKv<E, S> where
    E: KvEngine,
    S: RaftStoreRouter<E> + LocalReadRouter<E> + 'static, 
[src]

impl<E, S> Debug for RaftKv<E, S> where
    E: KvEngine,
    S: RaftStoreRouter<E> + LocalReadRouter<E> + 'static, 
[src]

impl<E, S> Display for RaftKv<E, S> where
    E: KvEngine,
    S: RaftStoreRouter<E> + LocalReadRouter<E> + 'static, 
[src]

impl<E, S> Engine for RaftKv<E, S> where
    E: KvEngine,
    S: RaftStoreRouter<E> + LocalReadRouter<E> + 'static, 
[src]

type Snap = RegionSnapshot<E::Snapshot>

type Local = E

Auto Trait Implementations

impl<E, S> !RefUnwindSafe for RaftKv<E, S>

impl<E, S> Send for RaftKv<E, S>

impl<E, S> Sync for RaftKv<E, S> where
    S: Sync

impl<E, S> Unpin for RaftKv<E, S> where
    S: Unpin

impl<E, S> !UnwindSafe for RaftKv<E, S>

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> ToString for T where
    T: Display + ?Sized
[src]

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]