Struct raftstore::store::RegionSnapshot[][src]

pub struct RegionSnapshot<S: Snapshot> {
    snap: Arc<S>,
    region: Arc<Region>,
    apply_index: Arc<AtomicU64>,
    pub max_ts_sync_status: Option<Arc<AtomicU64>>,
}

Snapshot of a region.

Only data within a region can be accessed.

Fields

snap: Arc<S>region: Arc<Region>apply_index: Arc<AtomicU64>max_ts_sync_status: Option<Arc<AtomicU64>>

Implementations

impl<S> RegionSnapshot<S> where
    S: Snapshot
[src]

pub fn new<EK>(
    ps: &PeerStorage<EK, impl RaftEngine>
) -> RegionSnapshot<EK::Snapshot> where
    EK: KvEngine
[src]

pub fn from_raw<EK>(db: EK, region: Region) -> RegionSnapshot<EK::Snapshot> where
    EK: KvEngine
[src]

pub fn from_snapshot(snap: Arc<S>, region: Arc<Region>) -> RegionSnapshot<S>[src]

pub fn get_region(&self) -> &Region[src]

pub fn get_snapshot(&self) -> &S[src]

pub fn get_apply_index(&self) -> Result<u64>[src]

fn get_apply_index_from_storage(&self) -> Result<u64>[src]

pub fn iter(&self, iter_opt: IterOptions) -> RegionIterator<S>[src]

pub fn iter_cf(
    &self,
    cf: &str,
    iter_opt: IterOptions
) -> Result<RegionIterator<S>>
[src]

pub fn scan<F>(
    &self,
    start_key: &[u8],
    end_key: &[u8],
    fill_cache: bool,
    f: F
) -> Result<()> where
    F: FnMut(&[u8], &[u8]) -> Result<bool>, 
[src]

pub fn scan_cf<F>(
    &self,
    cf: &str,
    start_key: &[u8],
    end_key: &[u8],
    fill_cache: bool,
    f: F
) -> Result<()> where
    F: FnMut(&[u8], &[u8]) -> Result<bool>, 
[src]

fn scan_impl<F>(
    &self,
    it: RegionIterator<S>,
    start_key: &[u8],
    f: F
) -> Result<()> where
    F: FnMut(&[u8], &[u8]) -> Result<bool>, 
[src]

pub fn get_start_key(&self) -> &[u8][src]

pub fn get_end_key(&self) -> &[u8][src]

impl<S> RegionSnapshot<S> where
    S: Snapshot
[src]

fn handle_get_value_error(
    &self,
    e: EngineError,
    cf: &str,
    key: &[u8]
) -> EngineError
[src]

Trait Implementations

impl<S> Clone for RegionSnapshot<S> where
    S: Snapshot
[src]

impl<S: Debug + Snapshot> Debug for RegionSnapshot<S>[src]

impl<S> Peekable for RegionSnapshot<S> where
    S: Snapshot
[src]

type DBVector = <S as Peekable>::DBVector

The byte-vector type through which the database returns read values.

Auto Trait Implementations

impl<S> RefUnwindSafe for RegionSnapshot<S> where
    S: RefUnwindSafe

impl<S> Send for RegionSnapshot<S>

impl<S> Sync for RegionSnapshot<S>

impl<S> Unpin for RegionSnapshot<S>

impl<S> UnwindSafe for RegionSnapshot<S> where
    S: RefUnwindSafe

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> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?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]