Struct raftstore::store::fsm::apply::ApplyFsm[][src]

pub struct ApplyFsm<EK> where
    EK: KvEngine
{ delegate: ApplyDelegate<EK>, receiver: Receiver<Msg<EK>>, mailbox: Option<BasicMailbox<ApplyFsm<EK>>>, }

Fields

delegate: ApplyDelegate<EK>receiver: Receiver<Msg<EK>>mailbox: Option<BasicMailbox<ApplyFsm<EK>>>

Implementations

impl<EK> ApplyFsm<EK> where
    EK: KvEngine
[src]

fn from_peer<ER: RaftEngine>(
    peer: &Peer<EK, ER>
) -> (LooseBoundedSender<Msg<EK>>, Box<ApplyFsm<EK>>)
[src]

fn from_registration(
    reg: Registration
) -> (LooseBoundedSender<Msg<EK>>, Box<ApplyFsm<EK>>)
[src]

fn handle_registration(&mut self, reg: Registration)[src]

Handles peer registration. When a peer is created, it will register an apply delegate.

fn handle_apply<W: WriteBatch<EK>>(
    &mut self,
    apply_ctx: &mut ApplyContext<EK, W>,
    apply: Apply<EK::Snapshot>
)
[src]

Handles apply tasks, and uses the apply delegate to handle the committed entries.

fn append_proposal(&mut self, props_drainer: Drain<'_, Proposal<EK::Snapshot>>)[src]

Handles proposals, and appends the commands to the apply delegate.

fn destroy<W: WriteBatch<EK>>(&mut self, ctx: &mut ApplyContext<EK, W>)[src]

fn handle_destroy<W: WriteBatch<EK>>(
    &mut self,
    ctx: &mut ApplyContext<EK, W>,
    d: Destroy
)
[src]

Handles peer destroy. When a peer is destroyed, the corresponding apply delegate should be removed too.

fn resume_pending<W: WriteBatch<EK>>(&mut self, ctx: &mut ApplyContext<EK, W>)[src]

fn logs_up_to_date_for_merge<W: WriteBatch<EK>>(
    &mut self,
    ctx: &mut ApplyContext<EK, W>,
    catch_up_logs: CatchUpLogs
)
[src]

fn handle_snapshot<W: WriteBatch<EK>>(
    &mut self,
    apply_ctx: &mut ApplyContext<EK, W>,
    snap_task: GenSnapTask
)
[src]

fn handle_change<W: WriteBatch<EK>>(
    &mut self,
    apply_ctx: &mut ApplyContext<EK, W>,
    cmd: ChangeObserver,
    region_epoch: RegionEpoch,
    cb: Callback<EK::Snapshot>
)
[src]

fn handle_tasks<W: WriteBatch<EK>>(
    &mut self,
    apply_ctx: &mut ApplyContext<EK, W>,
    msgs: &mut Vec<Msg<EK>>
)
[src]

Trait Implementations

impl<EK> Drop for ApplyFsm<EK> where
    EK: KvEngine
[src]

impl<EK> Fsm for ApplyFsm<EK> where
    EK: KvEngine
[src]

type Message = Msg<EK>

impl<EK, W> HandlerBuilder<ApplyFsm<EK>, ControlFsm> for Builder<EK, W> where
    EK: KvEngine,
    W: WriteBatch<EK>, 
[src]

type Handler = ApplyPoller<EK, W>

impl<EK, W> PollHandler<ApplyFsm<EK>, ControlFsm> for ApplyPoller<EK, W> where
    EK: KvEngine,
    W: WriteBatch<EK>, 
[src]

fn handle_control(&mut self, _: &mut ControlFsm) -> Option<usize>[src]

There is no control fsm in apply poller.

Auto Trait Implementations

impl<EK> !RefUnwindSafe for ApplyFsm<EK>

impl<EK> Send for ApplyFsm<EK>

impl<EK> !Sync for ApplyFsm<EK>

impl<EK> Unpin for ApplyFsm<EK>

impl<EK> !UnwindSafe for ApplyFsm<EK>

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]