Trait tikv::storage::mvcc::reader::scanner::forward::ScanPolicy [−][src]
Defines the behavior of the scanner.
Associated Types
Loading content...Required methods
fn handle_lock(
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
[src]
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
Handles the lock that the scanner meets.
If HandleRes::Return(val)
is returned, val
will be returned to the
caller of the scanner. Otherwise, HandleRes::Skip(current_user_key)
should be returned. Then, the scanner will handle the write records
if the write cursor points to the same user key, or continue scanning.
Note that the method should also take care of moving the cursors.
fn handle_write(
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
[src]
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
Handles the write record that the scanner meets.
If HandleRes::Return(val)
is returned, val
will be returned to the
caller of the scanner. Otherwise, HandleRes::Skip(current_user_key)
should be returned and the scanner will continue scanning.
Note that the method should also take care of moving the cursors.
Implementors
impl<S: Snapshot> ScanPolicy<S> for DeltaEntryPolicy
[src]
type Output = TxnEntry
fn handle_lock(
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
[src]
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
fn handle_write(
&mut self,
current_user_key: Key,
_cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
[src]
&mut self,
current_user_key: Key,
_cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
impl<S: Snapshot> ScanPolicy<S> for LatestEntryPolicy
[src]
type Output = TxnEntry
fn handle_lock(
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
[src]
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
fn handle_write(
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
[src]
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
impl<S: Snapshot> ScanPolicy<S> for LatestKvPolicy
[src]
type Output = (Key, Value)
fn handle_lock(
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
[src]
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
fn handle_write(
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>
[src]
&mut self,
current_user_key: Key,
cfg: &mut ScannerConfig<S>,
cursors: &mut Cursors<S>,
statistics: &mut Statistics
) -> Result<HandleRes<Self::Output>>