Struct raftstore::store::fsm::apply::ApplyFsm [−][src]
Fields
delegate: ApplyDelegate<EK>
receiver: Receiver<Msg<EK>>
mailbox: Option<BasicMailbox<ApplyFsm<EK>>>
Implementations
impl<EK> ApplyFsm<EK> where
EK: KvEngine,
[src]
EK: KvEngine,
fn from_peer<ER: RaftEngine>(
peer: &Peer<EK, ER>
) -> (LooseBoundedSender<Msg<EK>>, Box<ApplyFsm<EK>>)
[src]
peer: &Peer<EK, ER>
) -> (LooseBoundedSender<Msg<EK>>, Box<ApplyFsm<EK>>)
fn from_registration(
reg: Registration
) -> (LooseBoundedSender<Msg<EK>>, Box<ApplyFsm<EK>>)
[src]
reg: Registration
) -> (LooseBoundedSender<Msg<EK>>, Box<ApplyFsm<EK>>)
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]
&mut self,
apply_ctx: &mut ApplyContext<EK, W>,
apply: Apply<EK::Snapshot>
)
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]
&mut self,
ctx: &mut ApplyContext<EK, W>,
d: Destroy
)
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]
&mut self,
ctx: &mut ApplyContext<EK, W>,
catch_up_logs: CatchUpLogs
)
fn handle_snapshot<W: WriteBatch<EK>>(
&mut self,
apply_ctx: &mut ApplyContext<EK, W>,
snap_task: GenSnapTask
)
[src]
&mut self,
apply_ctx: &mut ApplyContext<EK, W>,
snap_task: GenSnapTask
)
fn handle_change<W: WriteBatch<EK>>(
&mut self,
apply_ctx: &mut ApplyContext<EK, W>,
cmd: ChangeObserver,
region_epoch: RegionEpoch,
cb: Callback<EK::Snapshot>
)
[src]
&mut self,
apply_ctx: &mut ApplyContext<EK, W>,
cmd: ChangeObserver,
region_epoch: RegionEpoch,
cb: Callback<EK::Snapshot>
)
fn handle_tasks<W: WriteBatch<EK>>(
&mut self,
apply_ctx: &mut ApplyContext<EK, W>,
msgs: &mut Vec<Msg<EK>>
)
[src]
&mut self,
apply_ctx: &mut ApplyContext<EK, W>,
msgs: &mut Vec<Msg<EK>>
)
Trait Implementations
impl<EK> Drop for ApplyFsm<EK> where
EK: KvEngine,
[src]
EK: KvEngine,
impl<EK> Fsm for ApplyFsm<EK> where
EK: KvEngine,
[src]
EK: KvEngine,
type Message = Msg<EK>
fn is_stopped(&self) -> bool
[src]
fn set_mailbox(&mut self, mailbox: Cow<'_, BasicMailbox<Self>>) where
Self: Sized,
[src]
Self: Sized,
fn take_mailbox(&mut self) -> Option<BasicMailbox<Self>> where
Self: Sized,
[src]
Self: Sized,
fn get_priority(&self) -> Priority
[src]
impl<EK, W> HandlerBuilder<ApplyFsm<EK>, ControlFsm> for Builder<EK, W> where
EK: KvEngine,
W: WriteBatch<EK>,
[src]
EK: KvEngine,
W: WriteBatch<EK>,
type Handler = ApplyPoller<EK, W>
fn build(&mut self, priority: Priority) -> ApplyPoller<EK, W>
[src]
impl<EK, W> PollHandler<ApplyFsm<EK>, ControlFsm> for ApplyPoller<EK, W> where
EK: KvEngine,
W: WriteBatch<EK>,
[src]
EK: KvEngine,
W: WriteBatch<EK>,
fn begin(&mut self, _batch_size: usize)
[src]
fn handle_control(&mut self, _: &mut ControlFsm) -> Option<usize>
[src]
There is no control fsm in apply poller.
fn handle_normal(&mut self, normal: &mut ApplyFsm<EK>) -> Option<usize>
[src]
fn end(&mut self, fsms: &mut [Box<ApplyFsm<EK>>])
[src]
fn get_priority(&self) -> Priority
[src]
pub fn pause(&mut self)
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src]
W: ConvertTo<V>,
pub fn convert_from(ctx: &mut EvalContext, from: W) -> Result<V, Error>
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,