你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ReplicaRole Enum

  • java.lang.Object
    • java.lang.Enum<ReplicaRole>
      • system.fabric.ReplicaRole

public enum ReplicaRole

Indicates the role of a stateful service replica.

Remarks:Service Fabric requires different behaviors from a service replica depending on what role it currently performs.

Fields

ActiveSecondary

Refers to a replica in the set that receives state updates from the Primary replica, applies them, and sends acknowledgements back. Secondary replicas must participate in the write quorum for a replica set. There can be multiple active Secondary replicas in a replica set at a time. The number of active Secondary replicas is configurable that the reliability subsystem should maintain.

IdleSecondary

Refers to a replica in the set that receives a state transfer from the Primary replica to prepare for becoming an active Secondary replica. There can be multiple Idle Secondary replicas in a replica set at a time. Idle Secondary replicas do not count as a part of a write quorum.

None

Specifies that the replica has no responsibility in regard to the replica set.

Remarks: When changeRoleAsync(ReplicaRole newRole, CancellationToken cancellationToken) indicates this role, it is safe to delete any persistent state that is associated with this replica.

Primary

Refers to the replica in the set on which all read and write operations are complete in order to enforce strong consistency semantics. Read operations are handled directly by the Primary replica, while write operations must be acknowledged by a quorum of the replicas in the replica set. There can only be one Primary replica in a replica set at a time.

Unknown

Indicates the initial role that a replica is created in.

Methods

get(int value)

public static ReplicaRole get(int value)

Parameters

value
int

Returns

getValue()

public int getValue()

Returns

int

Applies to