Compartir vía


StatefulServicePartition Interface

public interface StatefulServicePartition extends ServicePartition

Method Summary

Modifier and Type Method and Description
FabricReplicator createReplicator(StateProvider stateProvider, ReplicatorSettings replicatorSettings)

Creates a FabricReplicator with the specified settings and returns it to the replica.

Remarks:This method should be used to create a FabricReplicator to service as the StateReplicator for a stateful service that implements StateProvider.

PartitionAccessStatus getReadStatus()

Used to check the readiness of the replica in regard to read operations.

Remarks:The readStatus should be checked before the replica is servicing a customer request that is a read operation.

PartitionAccessStatus getwriteStatus()

Used to check the readiness of the partition in regard to write operations.

Remarks:The WriteStatus should be checked before the replica services a customer request that is a write operation.

void reportReplicaHealth(HealthInformation healthInfo)

Reports health of the current replica associated with this partition.

Inherited Members

Method Details

createReplicator

public FabricReplicator createReplicator(StateProvider stateProvider, ReplicatorSettings replicatorSettings)

Creates a FabricReplicator with the specified settings and returns it to the replica.

Remarks:This method should be used to create a FabricReplicator to service as the StateReplicator for a stateful service that implements StateProvider.

Parameters:

stateProvider - The StateProvider with which the returned FabricReplicator should be associated. This is often the same object that implements StatefulServiceReplica, but certain services might be factored differently.
replicatorSettings -

ReplicatorSettings with which the returned FabricReplicator should be configured.

Returns:

getReadStatus

public PartitionAccessStatus getReadStatus()

Used to check the readiness of the replica in regard to read operations.

Remarks:The readStatus should be checked before the replica is servicing a customer request that is a read operation.

Returns:

Throws:

system.fabric.exception.FabricObjectClosedException - This indicates that the partition object is closed. The replica/replicator/instance has either been closed or is about to be closed.

getwriteStatus

public PartitionAccessStatus getwriteStatus()

Used to check the readiness of the partition in regard to write operations.

Remarks:The WriteStatus should be checked before the replica services a customer request that is a write operation.

Returns:

Throws:

system.fabric.exception.FabricObjectClosedException - This indicates that the partition object is closed. The replica/replicator/instance has either been closed or is about to be closed.

reportReplicaHealth

public void reportReplicaHealth(HealthInformation healthInfo)

Reports health of the current replica associated with this partition.

Parameters:

healthInfo - Health information that is to be reported.

Applies to