pub struct AdvancedDistributedCoordinator { /* private fields */ }Expand description
Advanced distributed coordinator that integrates all distributed components
Implementations§
Source§impl AdvancedDistributedCoordinator
impl AdvancedDistributedCoordinator
Sourcepub fn new(config: AdvancedClusterConfig) -> Result<Self>
pub fn new(config: AdvancedClusterConfig) -> Result<Self>
Create a new advanced distributed coordinator
Sourcepub fn start(&mut self, node_id: String, peers: Vec<String>) -> Result<()>
pub fn start(&mut self, node_id: String, peers: Vec<String>) -> Result<()>
Start the distributed coordinator
Sourcepub fn get_consensus_state(&self) -> Option<ConsensusState>
pub fn get_consensus_state(&self) -> Option<ConsensusState>
Get consensus state
Sourcepub fn find_shard(&self, key: &str) -> Result<String>
pub fn find_shard(&self, key: &str) -> Result<String>
Find shard for a key
Sourcepub fn get_node_for_key(&self, key: &str) -> Result<String>
pub fn get_node_for_key(&self, key: &str) -> Result<String>
Get node responsible for a key
Sourcepub fn remove_node(&mut self, node_id: &str) -> Result<()>
pub fn remove_node(&mut self, node_id: &str) -> Result<()>
Remove a node from the cluster
Sourcepub fn update_node_metrics(
&mut self,
node_id: &str,
metrics: NodeMetrics,
) -> Result<()>
pub fn update_node_metrics( &mut self, node_id: &str, metrics: NodeMetrics, ) -> Result<()>
Update node metrics
Sourcepub fn get_health_summary(&self) -> HealthSummary
pub fn get_health_summary(&self) -> HealthSummary
Get cluster health summary
Sourcepub fn get_sharding_stats(&self) -> ShardingStats
pub fn get_sharding_stats(&self) -> ShardingStats
Get sharding statistics
Sourcepub fn get_cluster_state(&self) -> ClusterState
pub fn get_cluster_state(&self) -> ClusterState
Get cluster state
Sourcepub fn get_performance_metrics(&self) -> ClusterPerformanceMetrics
pub fn get_performance_metrics(&self) -> ClusterPerformanceMetrics
Get performance metrics
Sourcepub fn get_status(&self) -> CoordinatorStatus
pub fn get_status(&self) -> CoordinatorStatus
Get coordinator status
Sourcepub fn migrate_shard(
&mut self,
shard_id: &str,
target_node: Option<String>,
) -> Result<String>
pub fn migrate_shard( &mut self, shard_id: &str, target_node: Option<String>, ) -> Result<String>
Migrate shard to different node
Sourcepub fn process_recovery_actions(&mut self) -> Result<Vec<RecoveryAction>>
pub fn process_recovery_actions(&mut self) -> Result<Vec<RecoveryAction>>
Process recovery actions
Sourcepub fn update_performance_metrics(&mut self, metrics: ClusterPerformanceMetrics)
pub fn update_performance_metrics(&mut self, metrics: ClusterPerformanceMetrics)
Update cluster performance metrics
Sourcepub fn get_active_recoveries(&self) -> Vec<RecoveryOperation>
pub fn get_active_recoveries(&self) -> Vec<RecoveryOperation>
Get active recovery operations
Sourcepub fn list_shards(&self) -> Vec<DataShard>
pub fn list_shards(&self) -> Vec<DataShard>
List all shards
Auto Trait Implementations§
impl Freeze for AdvancedDistributedCoordinator
impl !RefUnwindSafe for AdvancedDistributedCoordinator
impl Send for AdvancedDistributedCoordinator
impl Sync for AdvancedDistributedCoordinator
impl Unpin for AdvancedDistributedCoordinator
impl UnsafeUnpin for AdvancedDistributedCoordinator
impl !UnwindSafe for AdvancedDistributedCoordinator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.