共用方式為


Epoch Struct

Definition

Represents the current version of the partition in Service Fabric.

[System.Serializable]
public struct Epoch : IComparable<System.Fabric.Epoch>, IEquatable<System.Fabric.Epoch>
[<System.Serializable>]
type Epoch = struct
Public Structure Epoch
Implements IComparable(Of Epoch), IEquatable(Of Epoch)
Inheritance
Epoch
Attributes
Implements

Remarks

An Epoch is a configuration number for the partition as a whole. When the configuration of the replica set changes, for example when the Primary replica changes, the operations that are replicated from the new Primary replica are said to be a new Epoch from the ones which were sent by the old Primary replica. The fact that the Primary has changed is not directly visible to Secondary replicas, which are usually unaffected by the failure that affected the original Primary replica. To track that the Primary replica has changed has to be communicated to the Secondary replica. This communication occurs via the UpdateEpochAsync(Epoch, Int64, CancellationToken) method. Most services can ignore the details of the inner fields of the Epoch as it is usually sufficient to know that the Epoch has changed and to compare Epochs to determine relative ordering of operations and events in the system. Comparison operations are provided for this purpose.

Constructors

Epoch(Int64, Int64)

Initializes a new instance of the Epoch class with the specified data loss number and configuration number.

Properties

ConfigurationNumber

Gets or sets the current configuration number property in this Epoch.

DataLossNumber

Gets the current data loss number in this Epoch.

Methods

CompareTo(Epoch)

Compares this Epoch object to the specified otherEpoch object.

Equals(Epoch)

Determines whether the specified Epoch object is equal to the current Epoch object.

Equals(Object)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as a hash function for the Epoch type.

Operators

Equality(Epoch, Epoch)

Determines whether two specified Epoch objects have the same value.

GreaterThan(Epoch, Epoch)

Determines whether one specified Epoch object is greater than another specified Epoch object.

GreaterThanOrEqual(Epoch, Epoch)

Determines whether one specified Epoch object is greater than or equal to another specified Epoch object.

Inequality(Epoch, Epoch)

Determines whether two specified Epoch objects have different values.

LessThan(Epoch, Epoch)

Determines whether one specified Epoch object is less than another specified Epoch object.

LessThanOrEqual(Epoch, Epoch)

Determines whether one specified Epoch object is less than or equal to another specified Epoch object.

Applies to