Trait tikv::storage::Engine [−][src]
Engine defines the common behaviour for a storage engine type.
Associated Types
Required methods
pub fn kv_engine(&self) -> Self::Local
[src][−]
Local storage engine.
pub fn snapshot_on_kv_engine(
&self,
start_key: &[u8],
end_key: &[u8]
) -> Result<Self::Snap, Error>
[src]
&self,
start_key: &[u8],
end_key: &[u8]
) -> Result<Self::Snap, Error>
pub fn modify_on_kv_engine(
&self,
modifies: Vec<Modify, Global>
) -> Result<(), Error>
[src][−]
&self,
modifies: Vec<Modify, Global>
) -> Result<(), Error>
Write modifications into internal local engine directly.
pub fn async_snapshot(
&self,
ctx: SnapContext<'_>,
cb: Box<dyn FnOnce((CbContext, Result<Self::Snap, Error>)) + 'static + Send, Global>
) -> Result<(), Error>
[src]
&self,
ctx: SnapContext<'_>,
cb: Box<dyn FnOnce((CbContext, Result<Self::Snap, Error>)) + 'static + Send, Global>
) -> Result<(), Error>
pub fn async_write(
&self,
ctx: &Context,
batch: WriteData,
write_cb: Box<dyn FnOnce((CbContext, Result<(), Error>)) + 'static + Send, Global>
) -> Result<(), Error>
[src]
&self,
ctx: &Context,
batch: WriteData,
write_cb: Box<dyn FnOnce((CbContext, Result<(), Error>)) + 'static + Send, Global>
) -> Result<(), Error>
Provided methods
pub fn async_write_ext(
&self,
ctx: &Context,
batch: WriteData,
write_cb: Box<dyn FnOnce((CbContext, Result<(), Error>)) + 'static + Send, Global>,
_proposed_cb: Option<Box<dyn FnOnce() + 'static + Send, Global>>,
_committed_cb: Option<Box<dyn FnOnce() + 'static + Send, Global>>
) -> Result<(), Error>
[src][−]
&self,
ctx: &Context,
batch: WriteData,
write_cb: Box<dyn FnOnce((CbContext, Result<(), Error>)) + 'static + Send, Global>,
_proposed_cb: Option<Box<dyn FnOnce() + 'static + Send, Global>>,
_committed_cb: Option<Box<dyn FnOnce() + 'static + Send, Global>>
) -> Result<(), Error>
Writes data to the engine asynchronously with some extensions.
When the write request is proposed successfully, the proposed_cb
is invoked.
When the write request is finished, the write_cb
is invoked.
pub fn write(&self, ctx: &Context, batch: WriteData) -> Result<(), Error>
[src]
pub fn release_snapshot(&self)
[src]
pub fn snapshot(&self, ctx: SnapContext<'_>) -> Result<Self::Snap, Error>
[src]
pub fn put(
&self,
ctx: &Context,
key: Key,
value: Vec<u8, Global>
) -> Result<(), Error>
[src]
&self,
ctx: &Context,
key: Key,
value: Vec<u8, Global>
) -> Result<(), Error>
pub fn put_cf(
&self,
ctx: &Context,
cf: &'static str,
key: Key,
value: Vec<u8, Global>
) -> Result<(), Error>
[src]
&self,
ctx: &Context,
cf: &'static str,
key: Key,
value: Vec<u8, Global>
) -> Result<(), Error>
pub fn delete(&self, ctx: &Context, key: Key) -> Result<(), Error>
[src]
pub fn delete_cf(
&self,
ctx: &Context,
cf: &'static str,
key: Key
) -> Result<(), Error>
[src]
&self,
ctx: &Context,
cf: &'static str,
key: Key
) -> Result<(), Error>
pub fn get_mvcc_properties_cf(
&self,
&'static str,
_safe_point: TimeStamp,
_start: &[u8],
_end: &[u8]
) -> Option<MvccProperties>
[src]
&self,
&'static str,
_safe_point: TimeStamp,
_start: &[u8],
_end: &[u8]
) -> Option<MvccProperties>
Implementors
impl Engine for BTreeEngine
[src][+]
impl Engine for RocksEngine
[src][+]
impl<E, S> Engine for RaftKv<E, S> where
E: KvEngine,
S: RaftStoreRouter<E> + LocalReadRouter<E> + 'static,
[src][+]
E: KvEngine,
S: RaftStoreRouter<E> + LocalReadRouter<E> + 'static,