pub struct StatefulServicePartitionMock { /* private fields */ }Implementations§
Source§impl StatefulServicePartitionMock
impl StatefulServicePartitionMock
pub fn new(info: ServicePartitionInformation) -> Self
pub fn new_boxed( info: ServicePartitionInformation, ) -> Box<dyn IStatefulServicePartition>
pub fn set_read_status(&self, status: ServicePartitionAccessStatus)
pub fn set_write_status(&self, status: ServicePartitionAccessStatus)
Trait Implementations§
Source§impl Clone for StatefulServicePartitionMock
impl Clone for StatefulServicePartitionMock
Source§fn clone(&self) -> StatefulServicePartitionMock
fn clone(&self) -> StatefulServicePartitionMock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl IStatefulServicePartition for StatefulServicePartitionMock
impl IStatefulServicePartition for StatefulServicePartitionMock
Source§fn create_replicator(&self) -> Result<Box<dyn IPrimaryReplicator>>
fn create_replicator(&self) -> Result<Box<dyn IPrimaryReplicator>>
Creates a FabricReplicator with the specified settings and returns it to the replica.
Not supported currently.
Source§fn get_partition_information(&self) -> Result<ServicePartitionInformation>
fn get_partition_information(&self) -> Result<ServicePartitionInformation>
Provides access to the ServicePartitionInformation of the service, which contains the partition type and ID.
Source§fn get_read_status(&self) -> Result<ServicePartitionAccessStatus>
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.
Source§fn get_write_status(&self) -> Result<ServicePartitionAccessStatus>
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.
Source§fn report_load(&self, _metrics: &[LoadMetric]) -> Result<()>
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.
Source§fn report_fault(&self, _fault_type: FaultType) -> Result<()>
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.
Source§fn report_move_cost(&self, _move_cost: MoveCost) -> Result<()>
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.
Source§fn report_partition_health(&self, _healthinfo: &HealthInformation) -> Result<()>
fn report_partition_health(&self, _healthinfo: &HealthInformation) -> Result<()>
Reports current partition health.
Source§fn report_replica_health(&self, _healthinfo: &HealthInformation) -> Result<()>
fn report_replica_health(&self, _healthinfo: &HealthInformation) -> Result<()>
Reports health on the current stateful service replica of the partition.
Source§fn try_get_com(&self) -> Result<&IFabricStatefulServicePartition>
fn try_get_com(&self) -> Result<&IFabricStatefulServicePartition>
Returns the com object for proxy interop. This is only used when using Proxy.
Auto Trait Implementations§
impl Freeze for StatefulServicePartitionMock
impl RefUnwindSafe for StatefulServicePartitionMock
impl Send for StatefulServicePartitionMock
impl Sync for StatefulServicePartitionMock
impl Unpin for StatefulServicePartitionMock
impl UnsafeUnpin for StatefulServicePartitionMock
impl UnwindSafe for StatefulServicePartitionMock
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