Struct test_raftstore::pd::Cluster [−][src]
Fields
meta: Cluster
stores: HashMap<u64, Store>
regions: BTreeMap<Key, Region>
region_id_keys: HashMap<u64, Key>
region_approximate_size: HashMap<u64, u64>
region_approximate_keys: HashMap<u64, u64>
region_last_report_ts: HashMap<u64, UnixSecs>
region_last_report_term: HashMap<u64, u64>
base_id: AtomicUsize
store_stats: HashMap<u64, StoreStats>
store_hotspots: HashMap<u64, HashMap<u64, PeerStat>>
split_count: usize
operators: HashMap<u64, Operator>
enable_peer_count_check: bool
leaders: HashMap<u64, Peer>
down_peers: HashMap<u64, PeerStats>
pending_peers: HashMap<u64, Peer>
is_bootstraped: bool
gc_safe_point: u64
replication_status: Option<ReplicationStatus>
region_replication_status: HashMap<u64, RegionReplicationStatus>
check_merge_target_integrity: bool
Implementations
impl Cluster
[src]
fn new(cluster_id: u64) -> Cluster
[src]
fn bootstrap(&mut self, store: Store, region: Region)
[src]
fn set_bootstrap(&mut self, is_bootstraped: bool)
[src]
fn alloc_id(&self) -> Result<u64>
[src]
fn put_store(&mut self, store: Store) -> Result<()>
[src]
fn get_store(&self, store_id: u64) -> Result<Store>
[src]
fn get_all_stores(&self) -> Result<Vec<Store>>
[src]
fn get_region(&self, key: Vec<u8>) -> Option<Region>
[src]
fn get_region_by_id(&self, region_id: u64) -> Result<Option<Region>>
[src]
fn get_region_approximate_size(&self, region_id: u64) -> Option<u64>
[src]
fn get_region_approximate_keys(&self, region_id: u64) -> Option<u64>
[src]
fn get_region_last_report_ts(&self, region_id: u64) -> Option<UnixSecs>
[src]
fn get_region_last_report_term(&self, region_id: u64) -> Option<u64>
[src]
fn get_store_hotspots(&self, store_id: u64) -> Option<HashMap<u64, PeerStat>>
[src]
fn get_stores(&self) -> Vec<Store>
[src]
fn get_regions_number(&self) -> usize
[src]
fn add_region(&mut self, region: &Region)
[src]
fn remove_region(&mut self, region: &Region)
[src]
fn get_overlap(&self, start_key: Vec<u8>, end_key: Vec<u8>) -> Vec<Region>
[src]
fn check_put_region(&mut self, region: Region) -> Result<Vec<Region>>
[src]
fn handle_heartbeat(
&mut self,
region: Region,
leader: Peer
) -> Result<RegionHeartbeatResponse>
[src]
&mut self,
region: Region,
leader: Peer
) -> Result<RegionHeartbeatResponse>
fn handle_heartbeat_max_peer_count(
&mut self,
region: &Region,
leader: &Peer
) -> Option<Operator>
[src]
&mut self,
region: &Region,
leader: &Peer
) -> Option<Operator>
fn poll_heartbeat_responses_for(
&mut self,
store_id: u64
) -> Vec<RegionHeartbeatResponse>
[src]
&mut self,
store_id: u64
) -> Vec<RegionHeartbeatResponse>
fn poll_heartbeat_responses(
&mut self,
region: Region,
leader: Peer
) -> Option<RegionHeartbeatResponse>
[src]
&mut self,
region: Region,
leader: Peer
) -> Option<RegionHeartbeatResponse>
fn region_heartbeat(
&mut self,
term: u64,
region: Region,
leader: Peer,
region_stat: RegionStat,
replication_status: Option<RegionReplicationStatus>
) -> Result<RegionHeartbeatResponse>
[src]
&mut self,
term: u64,
region: Region,
leader: Peer,
region_stat: RegionStat,
replication_status: Option<RegionReplicationStatus>
) -> Result<RegionHeartbeatResponse>
fn set_gc_safe_point(&mut self, safe_point: u64)
[src]
fn get_gc_safe_point(&self) -> u64
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Cluster
impl Send for Cluster
impl Sync for Cluster
impl Unpin for Cluster
impl !UnwindSafe for Cluster
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>,