Struct tikv::server::node::Node [−][src]
A wrapper for the raftstore which runs Multi-Raft.
Fields
cluster_id: u64
store: Store
store_cfg: Arc<VersionTrack<StoreConfig>>
system: RaftBatchSystem<RocksEngine, ER>
has_started: bool
pd_client: Arc<C>
state: Arc<Mutex<GlobalReplicationState>>
bg_worker: Worker
Implementations
impl<C, ER> Node<C, ER> where
C: PdClient,
ER: RaftEngine,
[src]
C: PdClient,
ER: RaftEngine,
pub fn new(
system: RaftBatchSystem<RocksEngine, ER>,
cfg: &ServerConfig,
store_cfg: Arc<VersionTrack<StoreConfig>>,
pd_client: Arc<C>,
state: Arc<Mutex<GlobalReplicationState>>,
bg_worker: Worker
) -> Node<C, ER>
[src]
system: RaftBatchSystem<RocksEngine, ER>,
cfg: &ServerConfig,
store_cfg: Arc<VersionTrack<StoreConfig>>,
pd_client: Arc<C>,
state: Arc<Mutex<GlobalReplicationState>>,
bg_worker: Worker
) -> Node<C, ER>
Creates a new Node.
pub fn try_bootstrap_store(
&mut self,
engines: Engines<RocksEngine, ER>
) -> Result<()>
[src]
&mut self,
engines: Engines<RocksEngine, ER>
) -> Result<()>
pub fn start<T>(
&mut self,
engines: Engines<RocksEngine, ER>,
trans: T,
snap_mgr: SnapManager,
pd_worker: FutureWorker<PdTask<RocksEngine>>,
store_meta: Arc<Mutex<StoreMeta>>,
coprocessor_host: CoprocessorHost<RocksEngine>,
importer: Arc<SSTImporter>,
split_check_scheduler: Scheduler<SplitCheckTask>,
auto_split_controller: AutoSplitController,
concurrency_manager: ConcurrencyManager
) -> Result<()> where
T: Transport + 'static,
[src]
&mut self,
engines: Engines<RocksEngine, ER>,
trans: T,
snap_mgr: SnapManager,
pd_worker: FutureWorker<PdTask<RocksEngine>>,
store_meta: Arc<Mutex<StoreMeta>>,
coprocessor_host: CoprocessorHost<RocksEngine>,
importer: Arc<SSTImporter>,
split_check_scheduler: Scheduler<SplitCheckTask>,
auto_split_controller: AutoSplitController,
concurrency_manager: ConcurrencyManager
) -> Result<()> where
T: Transport + 'static,
Starts the Node. It tries to bootstrap cluster if the cluster is not bootstrapped yet. Then it spawns a thread to run the raftstore in background.
pub fn id(&self) -> u64
[src]
Gets the store id.
pub fn get_router(&self) -> RaftRouter<RocksEngine, ER>
[src]
Gets a transmission end of a channel which is used to send Msg
to the
raftstore.
pub fn get_apply_router(&self) -> ApplyRouter<RocksEngine>
[src]
Gets a transmission end of a channel which is used send messages to apply worker.
fn check_store(&self, engines: &Engines<RocksEngine, ER>) -> Result<u64>
[src]
fn alloc_id(&self) -> Result<u64>
[src]
fn load_all_stores(&mut self, status: Option<ReplicationStatus>)
[src]
fn check_or_prepare_bootstrap_cluster(
&self,
engines: &Engines<RocksEngine, ER>,
store_id: u64
) -> Result<Option<Region>>
[src]
&self,
engines: &Engines<RocksEngine, ER>,
store_id: u64
) -> Result<Option<Region>>
fn bootstrap_cluster(
&mut self,
engines: &Engines<RocksEngine, ER>,
first_region: Region
) -> Result<()>
[src]
&mut self,
engines: &Engines<RocksEngine, ER>,
first_region: Region
) -> Result<()>
fn check_cluster_bootstrapped(&self) -> Result<bool>
[src]
fn start_store<T>(
&mut self,
store_id: u64,
engines: Engines<RocksEngine, ER>,
trans: T,
snap_mgr: SnapManager,
pd_worker: FutureWorker<PdTask<RocksEngine>>,
store_meta: Arc<Mutex<StoreMeta>>,
coprocessor_host: CoprocessorHost<RocksEngine>,
importer: Arc<SSTImporter>,
split_check_scheduler: Scheduler<SplitCheckTask>,
auto_split_controller: AutoSplitController,
concurrency_manager: ConcurrencyManager
) -> Result<()> where
T: Transport + 'static,
[src]
&mut self,
store_id: u64,
engines: Engines<RocksEngine, ER>,
trans: T,
snap_mgr: SnapManager,
pd_worker: FutureWorker<PdTask<RocksEngine>>,
store_meta: Arc<Mutex<StoreMeta>>,
coprocessor_host: CoprocessorHost<RocksEngine>,
importer: Arc<SSTImporter>,
split_check_scheduler: Scheduler<SplitCheckTask>,
auto_split_controller: AutoSplitController,
concurrency_manager: ConcurrencyManager
) -> Result<()> where
T: Transport + 'static,
fn stop_store(&mut self, store_id: u64)
[src]
pub fn stop(&mut self)
[src]
Stops the Node.
Auto Trait Implementations
impl<C, ER> !RefUnwindSafe for Node<C, ER>
impl<C, ER> Send for Node<C, ER>
impl<C, ER> !Sync for Node<C, ER>
impl<C, ER> Unpin for Node<C, ER>
impl<C, ER> !UnwindSafe for Node<C, ER>
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>,