Trait tikv_kv::Engine [−][src]
Engine defines the common behaviour for a storage engine type.
Associated Types
Loading content...Required methods
fn kv_engine(&self) -> Self::Local
[src]
Local storage engine.
fn snapshot_on_kv_engine(
&self,
start_key: &[u8],
end_key: &[u8]
) -> Result<Self::Snap>
[src]
&self,
start_key: &[u8],
end_key: &[u8]
) -> Result<Self::Snap>
fn modify_on_kv_engine(&self, modifies: Vec<Modify>) -> Result<()>
[src]
Write modifications into internal local engine directly.
fn async_snapshot(
&self,
ctx: SnapContext<'_>,
cb: Callback<Self::Snap>
) -> Result<()>
[src]
&self,
ctx: SnapContext<'_>,
cb: Callback<Self::Snap>
) -> Result<()>
fn async_write(
&self,
ctx: &Context,
batch: WriteData,
write_cb: Callback<()>
) -> Result<()>
[src]
&self,
ctx: &Context,
batch: WriteData,
write_cb: Callback<()>
) -> Result<()>
Provided methods
fn async_write_ext(
&self,
ctx: &Context,
batch: WriteData,
write_cb: Callback<()>,
_proposed_cb: Option<ExtCallback>,
_committed_cb: Option<ExtCallback>
) -> Result<()>
[src]
&self,
ctx: &Context,
batch: WriteData,
write_cb: Callback<()>,
_proposed_cb: Option<ExtCallback>,
_committed_cb: Option<ExtCallback>
) -> Result<()>
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.
fn write(&self, ctx: &Context, batch: WriteData) -> Result<()>
[src]
fn release_snapshot(&self)
[src]
fn snapshot(&self, ctx: SnapContext<'_>) -> Result<Self::Snap>
[src]
fn put(&self, ctx: &Context, key: Key, value: Value) -> Result<()>
[src]
fn put_cf(
&self,
ctx: &Context,
cf: CfName,
key: Key,
value: Value
) -> Result<()>
[src]
&self,
ctx: &Context,
cf: CfName,
key: Key,
value: Value
) -> Result<()>
fn delete(&self, ctx: &Context, key: Key) -> Result<()>
[src]
fn delete_cf(&self, ctx: &Context, cf: CfName, key: Key) -> Result<()>
[src]
fn get_mvcc_properties_cf(
&self,
_: CfName,
_safe_point: TimeStamp,
_start: &[u8],
_end: &[u8]
) -> Option<MvccProperties>
[src]
&self,
_: CfName,
_safe_point: TimeStamp,
_start: &[u8],
_end: &[u8]
) -> Option<MvccProperties>
Implementors
impl Engine for BTreeEngine
[src]
type Snap = BTreeEngineSnapshot
type Local = PanicEngine
fn kv_engine(&self) -> PanicEngine
[src]
fn snapshot_on_kv_engine(&self, _: &[u8], _: &[u8]) -> EngineResult<Self::Snap>
[src]
fn modify_on_kv_engine(&self, _: Vec<Modify>) -> EngineResult<()>
[src]
fn async_write(
&self,
_ctx: &Context,
batch: WriteData,
cb: EngineCallback<()>
) -> EngineResult<()>
[src]
&self,
_ctx: &Context,
batch: WriteData,
cb: EngineCallback<()>
) -> EngineResult<()>
fn async_snapshot(
&self,
_ctx: SnapContext<'_>,
cb: EngineCallback<Self::Snap>
) -> EngineResult<()>
[src]
&self,
_ctx: SnapContext<'_>,
cb: EngineCallback<Self::Snap>
) -> EngineResult<()>
warning: It returns a fake snapshot whose content will be affected by the later modifies!
impl Engine for MockEngine
[src]
type Snap = <RocksEngine as Engine>::Snap
type Local = <RocksEngine as Engine>::Local
fn kv_engine(&self) -> Self::Local
[src]
fn snapshot_on_kv_engine(
&self,
start_key: &[u8],
end_key: &[u8]
) -> Result<Self::Snap>
[src]
&self,
start_key: &[u8],
end_key: &[u8]
) -> Result<Self::Snap>
fn modify_on_kv_engine(&self, modifies: Vec<Modify>) -> Result<()>
[src]
fn async_snapshot(
&self,
ctx: SnapContext<'_>,
cb: Callback<Self::Snap>
) -> Result<()>
[src]
&self,
ctx: SnapContext<'_>,
cb: Callback<Self::Snap>
) -> Result<()>
fn async_write(
&self,
ctx: &Context,
batch: WriteData,
write_cb: Callback<()>
) -> Result<()>
[src]
&self,
ctx: &Context,
batch: WriteData,
write_cb: Callback<()>
) -> Result<()>
fn async_write_ext(
&self,
ctx: &Context,
batch: WriteData,
write_cb: Callback<()>,
proposed_cb: Option<ExtCallback>,
committed_cb: Option<ExtCallback>
) -> Result<()>
[src]
&self,
ctx: &Context,
batch: WriteData,
write_cb: Callback<()>,
proposed_cb: Option<ExtCallback>,
committed_cb: Option<ExtCallback>
) -> Result<()>
impl Engine for RocksEngine
[src]
type Snap = Arc<RocksSnapshot>
type Local = BaseRocksEngine
fn kv_engine(&self) -> BaseRocksEngine
[src]
fn snapshot_on_kv_engine(&self, _: &[u8], _: &[u8]) -> Result<Self::Snap>
[src]
fn modify_on_kv_engine(&self, modifies: Vec<Modify>) -> Result<()>
[src]
fn async_write(
&self,
ctx: &Context,
batch: WriteData,
cb: Callback<()>
) -> Result<()>
[src]
&self,
ctx: &Context,
batch: WriteData,
cb: Callback<()>
) -> Result<()>
fn async_write_ext(
&self,
_: &Context,
batch: WriteData,
cb: Callback<()>,
proposed_cb: Option<ExtCallback>,
committed_cb: Option<ExtCallback>
) -> Result<()>
[src]
&self,
_: &Context,
batch: WriteData,
cb: Callback<()>,
proposed_cb: Option<ExtCallback>,
committed_cb: Option<ExtCallback>
) -> Result<()>
fn async_snapshot(
&self,
_: SnapContext<'_>,
cb: Callback<Self::Snap>
) -> Result<()>
[src]
&self,
_: SnapContext<'_>,
cb: Callback<Self::Snap>
) -> Result<()>