pub struct StatefulServicePartition { /* private fields */ }
Expand description
Proxy COM object IFabricStatefulServicePartition3
Implementations§
Source§impl StatefulServicePartition
impl StatefulServicePartition
pub fn get_com(&self) -> &IFabricStatefulServicePartition3
Sourcepub fn get_partition_information(&self) -> Result<ServicePartitionInformation>
pub fn get_partition_information(&self) -> Result<ServicePartitionInformation>
Provides access to the ServicePartitionInformation of the service, which contains the partition type and ID.
Sourcepub fn get_read_status(&self) -> Result<ServicePartitionAccessStatus>
pub fn get_read_status(&self) -> Result<ServicePartitionAccessStatus>
Used to check the readiness of the replica in regard to read operations. The ReadStatus should be checked before the replica is servicing a customer request that is a read operation.
Sourcepub fn get_write_status(&self) -> Result<ServicePartitionAccessStatus>
pub fn get_write_status(&self) -> Result<ServicePartitionAccessStatus>
Used to check the readiness of the partition in regard to write operations. The WriteStatus should be checked before the replica services a customer request that is a write operation.
Sourcepub fn create_replicator(&self) -> Result<()>
pub fn create_replicator(&self) -> Result<()>
TODO: not implemented Creates a FabricReplicator with the specified settings and returns it to the replica.
Sourcepub fn report_load(&self, metrics: &[LoadMetric]) -> Result<()>
pub fn report_load(&self, metrics: &[LoadMetric]) -> Result<()>
Reports load for the current replica in the partition. Remarks: The reported metrics should correspond to those that are provided in the ServiceLoadMetricDescription as a part of the ServiceDescription that is used to create the service. Load metrics that are not present in the description are ignored. Reporting custom metrics allows Service Fabric to balance services that are based on additional custom information.
Sourcepub fn report_fault(&self, fault_type: FaultType) -> Result<()>
pub fn report_fault(&self, fault_type: FaultType) -> Result<()>
Enables the replica to report a fault to the runtime and indicates that it has encountered an error from which it cannot recover and must either be restarted or removed.
Sourcepub fn report_move_cost(&self, move_cost: MoveCost) -> Result<()>
pub fn report_move_cost(&self, move_cost: MoveCost) -> Result<()>
Reports the move cost for a replica. Remarks: Services can report move cost of a replica using this method. While the Service Fabric Resource Balances searches for the best balance in the cluster, it examines both load information and move cost of each replica. Resource balances will prefer to move replicas with lower cost in order to achieve balance.
Sourcepub fn report_partition_health(
&self,
healthinfo: &HealthInformation,
) -> Result<()>
pub fn report_partition_health( &self, healthinfo: &HealthInformation, ) -> Result<()>
Reports current partition health.
Sourcepub fn report_replica_health(
&self,
healthinfo: &HealthInformation,
) -> Result<()>
pub fn report_replica_health( &self, healthinfo: &HealthInformation, ) -> Result<()>
Reports health on the current stateful service replica of the partition.
Trait Implementations§
Source§impl Clone for StatefulServicePartition
impl Clone for StatefulServicePartition
Source§fn clone(&self) -> StatefulServicePartition
fn clone(&self) -> StatefulServicePartition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more