Trait test_raftstore::cluster::Simulator[][src]

pub trait Simulator {
    fn run_node(
        &mut self,
        node_id: u64,
        cfg: TiKvConfig,
        engines: Engines<RocksEngine, RocksEngine>,
        store_meta: Arc<Mutex<StoreMeta>>,
        key_manager: Option<Arc<DataKeyManager>>,
        router: RaftRouter<RocksEngine, RocksEngine>,
        system: RaftBatchSystem<RocksEngine, RocksEngine>
    ) -> ServerResult<u64>;
fn stop_node(&mut self, node_id: u64);
fn get_node_ids(&self) -> HashSet<u64>;
fn async_command_on_node(
        &self,
        node_id: u64,
        request: RaftCmdRequest,
        cb: Callback<RocksSnapshot>
    ) -> Result<()>;
fn send_raft_msg(&mut self, msg: RaftMessage) -> Result<()>;
fn get_snap_dir(&self, node_id: u64) -> String;
fn get_snap_mgr(&self, node_id: u64) -> &SnapManager;
fn get_router(
        &self,
        node_id: u64
    ) -> Option<RaftRouter<RocksEngine, RocksEngine>>;
fn add_send_filter(&mut self, node_id: u64, filter: Box<dyn Filter>);
fn clear_send_filters(&mut self, node_id: u64);
fn add_recv_filter(&mut self, node_id: u64, filter: Box<dyn Filter>);
fn clear_recv_filters(&mut self, node_id: u64);
fn async_read(
        &self,
        node_id: u64,
        batch_id: Option<ThreadReadId>,
        request: RaftCmdRequest,
        cb: Callback<RocksSnapshot>
    ); fn call_command(
        &self,
        request: RaftCmdRequest,
        timeout: Duration
    ) -> Result<RaftCmdResponse> { ... }
fn read(
        &self,
        batch_id: Option<ThreadReadId>,
        request: RaftCmdRequest,
        timeout: Duration
    ) -> Result<RaftCmdResponse> { ... }
fn call_command_on_node(
        &self,
        node_id: u64,
        request: RaftCmdRequest,
        timeout: Duration
    ) -> Result<RaftCmdResponse> { ... } }

Required methods

fn run_node(
    &mut self,
    node_id: u64,
    cfg: TiKvConfig,
    engines: Engines<RocksEngine, RocksEngine>,
    store_meta: Arc<Mutex<StoreMeta>>,
    key_manager: Option<Arc<DataKeyManager>>,
    router: RaftRouter<RocksEngine, RocksEngine>,
    system: RaftBatchSystem<RocksEngine, RocksEngine>
) -> ServerResult<u64>
[src]

fn stop_node(&mut self, node_id: u64)[src]

fn get_node_ids(&self) -> HashSet<u64>[src]

fn async_command_on_node(
    &self,
    node_id: u64,
    request: RaftCmdRequest,
    cb: Callback<RocksSnapshot>
) -> Result<()>
[src]

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

fn get_snap_dir(&self, node_id: u64) -> String[src]

fn get_snap_mgr(&self, node_id: u64) -> &SnapManager[src]

fn get_router(
    &self,
    node_id: u64
) -> Option<RaftRouter<RocksEngine, RocksEngine>>
[src]

fn add_send_filter(&mut self, node_id: u64, filter: Box<dyn Filter>)[src]

fn clear_send_filters(&mut self, node_id: u64)[src]

fn add_recv_filter(&mut self, node_id: u64, filter: Box<dyn Filter>)[src]

fn clear_recv_filters(&mut self, node_id: u64)[src]

fn async_read(
    &self,
    node_id: u64,
    batch_id: Option<ThreadReadId>,
    request: RaftCmdRequest,
    cb: Callback<RocksSnapshot>
)
[src]

Loading content...

Provided methods

fn call_command(
    &self,
    request: RaftCmdRequest,
    timeout: Duration
) -> Result<RaftCmdResponse>
[src]

fn read(
    &self,
    batch_id: Option<ThreadReadId>,
    request: RaftCmdRequest,
    timeout: Duration
) -> Result<RaftCmdResponse>
[src]

fn call_command_on_node(
    &self,
    node_id: u64,
    request: RaftCmdRequest,
    timeout: Duration
) -> Result<RaftCmdResponse>
[src]

Loading content...

Implementors

impl Simulator for NodeCluster[src]

impl Simulator for ServerCluster[src]

Loading content...