Struct test_raftstore::pd::Cluster[][src]

struct Cluster {
    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>,
    pub check_merge_target_integrity: bool,
}

Fields

meta: Clusterstores: 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: AtomicUsizestore_stats: HashMap<u64, StoreStats>store_hotspots: HashMap<u64, HashMap<u64, PeerStat>>split_count: usizeoperators: HashMap<u64, Operator>enable_peer_count_check: boolleaders: HashMap<u64, Peer>down_peers: HashMap<u64, PeerStats>pending_peers: HashMap<u64, Peer>is_bootstraped: boolgc_safe_point: u64replication_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]

fn handle_heartbeat_max_peer_count(
    &mut self,
    region: &Region,
    leader: &Peer
) -> Option<Operator>
[src]

fn poll_heartbeat_responses_for(
    &mut self,
    store_id: u64
) -> Vec<RegionHeartbeatResponse>
[src]

fn poll_heartbeat_responses(
    &mut self,
    region: Region,
    leader: Peer
) -> Option<RegionHeartbeatResponse>
[src]

fn region_heartbeat(
    &mut self,
    term: u64,
    region: Region,
    leader: Peer,
    region_stat: RegionStat,
    replication_status: Option<RegionReplicationStatus>
) -> Result<RegionHeartbeatResponse>
[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<V, W> ConvertFrom<W> for V where
    W: ConvertTo<V>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]