Trait raftstore::router::RaftStoreRouter[][src]

pub trait RaftStoreRouter<EK>: StoreRouter<EK> + ProposalRouter<EK::Snapshot> + CasualRouter<EK> + Send + Clone where
    EK: KvEngine
{ fn send_raft_msg(&self, msg: RaftMessage) -> RaftStoreResult<()>;
fn significant_send(
        &self,
        region_id: u64,
        msg: SignificantMsg<EK::Snapshot>
    ) -> RaftStoreResult<()>;
fn broadcast_normal(&self, msg_gen: impl FnMut() -> PeerMsg<EK>); fn send_casual_msg(
        &self,
        region_id: u64,
        msg: CasualMessage<EK>
    ) -> RaftStoreResult<()> { ... }
fn send_store_msg(&self, msg: StoreMsg<EK>) -> RaftStoreResult<()> { ... }
fn send_command(
        &self,
        req: RaftCmdRequest,
        cb: Callback<EK::Snapshot>
    ) -> RaftStoreResult<()> { ... }
fn send_command_with_deadline(
        &self,
        req: RaftCmdRequest,
        cb: Callback<EK::Snapshot>,
        deadline: Deadline
    ) -> RaftStoreResult<()> { ... }
fn report_unreachable(
        &self,
        region_id: u64,
        to_peer_id: u64
    ) -> RaftStoreResult<()> { ... }
fn report_snapshot_status(
        &self,
        region_id: u64,
        to_peer_id: u64,
        status: SnapshotStatus
    ) -> RaftStoreResult<()> { ... }
fn broadcast_unreachable(&self, store_id: u64) { ... }
fn report_resolved(&self, store_id: u64, group_id: u64) { ... } }

Routes messages to the raftstore.

Required methods

fn send_raft_msg(&self, msg: RaftMessage) -> RaftStoreResult<()>[src]

Sends RaftMessage to local store.

fn significant_send(
    &self,
    region_id: u64,
    msg: SignificantMsg<EK::Snapshot>
) -> RaftStoreResult<()>
[src]

Sends a significant message. We should guarantee that the message can’t be dropped.

fn broadcast_normal(&self, msg_gen: impl FnMut() -> PeerMsg<EK>)[src]

Broadcast a message generated by msg_gen to all Raft groups.

Loading content...

Provided methods

fn send_casual_msg(
    &self,
    region_id: u64,
    msg: CasualMessage<EK>
) -> RaftStoreResult<()>
[src]

Send a casual message to the given region.

fn send_store_msg(&self, msg: StoreMsg<EK>) -> RaftStoreResult<()>[src]

Send a store message to the backend raft batch system.

fn send_command(
    &self,
    req: RaftCmdRequest,
    cb: Callback<EK::Snapshot>
) -> RaftStoreResult<()>
[src]

Sends RaftCmdRequest to local store.

fn send_command_with_deadline(
    &self,
    req: RaftCmdRequest,
    cb: Callback<EK::Snapshot>,
    deadline: Deadline
) -> RaftStoreResult<()>
[src]

fn report_unreachable(
    &self,
    region_id: u64,
    to_peer_id: u64
) -> RaftStoreResult<()>
[src]

Reports the peer being unreachable to the Region.

fn report_snapshot_status(
    &self,
    region_id: u64,
    to_peer_id: u64,
    status: SnapshotStatus
) -> RaftStoreResult<()>
[src]

Reports the sending snapshot status to the peer of the Region.

fn broadcast_unreachable(&self, store_id: u64)[src]

Broadcast an StoreUnreachable event to all Raft groups.

fn report_resolved(&self, store_id: u64, group_id: u64)[src]

Report a StoreResolved event to all Raft groups.

Loading content...

Implementors

impl<EK> RaftStoreRouter<EK> for RaftStoreBlackHole where
    EK: KvEngine
[src]

fn send_raft_msg(&self, _: RaftMessage) -> RaftStoreResult<()>[src]

Sends RaftMessage to local store.

fn significant_send(
    &self,
    _: u64,
    _: SignificantMsg<EK::Snapshot>
) -> RaftStoreResult<()>
[src]

Sends a significant message. We should guarantee that the message can’t be dropped.

impl<EK: KvEngine, ER: RaftEngine> RaftStoreRouter<EK> for ServerRaftStoreRouter<EK, ER>[src]

fn significant_send(
    &self,
    region_id: u64,
    msg: SignificantMsg<EK::Snapshot>
) -> RaftStoreResult<()>
[src]

Sends a significant message. We should guarantee that the message can’t be dropped.

impl<EK: KvEngine, ER: RaftEngine> RaftStoreRouter<EK> for RaftRouter<EK, ER>[src]

Loading content...