Struct test_raftstore::server::ServerCluster [−][src]
Fields
metas: HashMap<u64, ServerMeta>
addrs: AddressMap
storages: HashMap<u64, SimulateEngine>
region_info_accessors: HashMap<u64, RegionInfoAccessor>
importers: HashMap<u64, Arc<SSTImporter>>
pending_services: HashMap<u64, Vec<Box<dyn Fn() -> Service>>>
coprocessor_hooks: HashMap<u64, Vec<Box<dyn Fn(&mut CoprocessorHost<RocksEngine>)>>>
security_mgr: Arc<SecurityManager>
txn_extra_schedulers: HashMap<u64, Arc<dyn TxnExtraScheduler>>
snap_paths: HashMap<u64, TempDir>
snap_mgrs: HashMap<u64, SnapManager>
pd_client: Arc<TestPdClient>
raft_client: RaftClient<AddressMap, RaftStoreBlackHole, RocksEngine>
concurrency_managers: HashMap<u64, ConcurrencyManager>
env: Arc<Environment>
Implementations
impl ServerCluster
[src]
pub fn new(pd_client: Arc<TestPdClient>) -> ServerCluster
[src]
pub fn get_addr(&self, node_id: u64) -> String
[src]
pub fn get_apply_router(&self, node_id: u64) -> ApplyRouter<RocksEngine>
[src]
pub fn get_server_router(
&self,
node_id: u64
) -> SimulateTransport<ServerRaftStoreRouter<RocksEngine, RocksEngine>>
[src]
&self,
node_id: u64
) -> SimulateTransport<ServerRaftStoreRouter<RocksEngine, RocksEngine>>
pub fn get_gc_worker(
&self,
node_id: u64
) -> &GcWorker<RaftKv<RocksEngine, SimulateTransport<ServerRaftStoreRouter<RocksEngine, RocksEngine>>>, SimulateTransport<ServerRaftStoreRouter<RocksEngine, RocksEngine>>>
[src]
&self,
node_id: u64
) -> &GcWorker<RaftKv<RocksEngine, SimulateTransport<ServerRaftStoreRouter<RocksEngine, RocksEngine>>>, SimulateTransport<ServerRaftStoreRouter<RocksEngine, RocksEngine>>>
To trigger GC manually.
pub fn get_concurrency_manager(&self, node_id: u64) -> ConcurrencyManager
[src]
pub fn start_resolved_ts_worker(&mut self)
[src]
Trait Implementations
impl Simulator for ServerCluster
[src]
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]
&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 get_snap_dir(&self, node_id: u64) -> String
[src]
fn get_snap_mgr(&self, node_id: u64) -> &SnapManager
[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]
&self,
node_id: u64,
request: RaftCmdRequest,
cb: Callback<RocksSnapshot>
) -> Result<()>
fn async_read(
&self,
node_id: u64,
batch_id: Option<ThreadReadId>,
request: RaftCmdRequest,
cb: Callback<RocksSnapshot>
)
[src]
&self,
node_id: u64,
batch_id: Option<ThreadReadId>,
request: RaftCmdRequest,
cb: Callback<RocksSnapshot>
)
fn send_raft_msg(&mut self, raft_msg: RaftMessage) -> Result<()>
[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 get_router(
&self,
node_id: u64
) -> Option<RaftRouter<RocksEngine, RocksEngine>>
[src]
&self,
node_id: u64
) -> Option<RaftRouter<RocksEngine, RocksEngine>>
fn call_command(
&self,
request: RaftCmdRequest,
timeout: Duration
) -> Result<RaftCmdResponse>
[src]
&self,
request: RaftCmdRequest,
timeout: Duration
) -> Result<RaftCmdResponse>
fn read(
&self,
batch_id: Option<ThreadReadId>,
request: RaftCmdRequest,
timeout: Duration
) -> Result<RaftCmdResponse>
[src]
&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>
[src]
&self,
node_id: u64,
request: RaftCmdRequest,
timeout: Duration
) -> Result<RaftCmdResponse>
Auto Trait Implementations
impl !RefUnwindSafe for ServerCluster
impl !Send for ServerCluster
impl !Sync for ServerCluster
impl Unpin for ServerCluster
impl !UnwindSafe for ServerCluster
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>,