Struct raftstore::store::peer::CmdEpochChecker[][src]

struct CmdEpochChecker<S: Snapshot> {
    proposed_admin_cmd: VecDeque<ProposedAdminCmd<S>>,
    term: u64,
}

Fields

proposed_admin_cmd: VecDeque<ProposedAdminCmd<S>>term: u64

Implementations

impl<S: Snapshot> CmdEpochChecker<S>[src]

fn maybe_update_term(&mut self, term: u64)[src]

pub fn propose_check_epoch(
    &mut self,
    req: &RaftCmdRequest,
    term: u64
) -> Option<u64>
[src]

Check if the proposal can be proposed on the basis of its epoch and previous proposed admin cmds.

Returns None if passing the epoch check, otherwise returns a index which is the last admin cmd index conflicted with this proposal.

pub fn post_propose(&mut self, cmd_type: AdminCmdType, index: u64, term: u64)[src]

fn last_conflict_index(
    &self,
    check_ver: bool,
    check_conf_ver: bool
) -> Option<u64>
[src]

pub fn last_cmd_index(&mut self, cmd_type: AdminCmdType) -> Option<u64>[src]

Returns the last proposed admin cmd index.

Note that the cmd of this type must change epoch otherwise it can not be recorded to proposed_admin_cmd.

pub fn advance_apply(&mut self, index: u64, term: u64, region: &Region)[src]

pub fn attach_to_conflict_cmd(&mut self, index: u64, cb: Callback<S>)[src]

Trait Implementations

impl<S: Snapshot> Default for CmdEpochChecker<S>[src]

impl<S: Snapshot> Drop for CmdEpochChecker<S>[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for CmdEpochChecker<S>

impl<S> Send for CmdEpochChecker<S>

impl<S> !Sync for CmdEpochChecker<S>

impl<S> Unpin for CmdEpochChecker<S>

impl<S> !UnwindSafe for CmdEpochChecker<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, 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]