Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the DeployedStatefulServiceReplicaDetailInfo class.
 /// </summary>
 /// <param name="serviceName">Full hierarchical name of the service in URI format starting with `fabric:`.</param>
 /// <param name="partitionId">An internal ID used by Service Fabric to uniquely identify a partition. This is a
 /// randomly generated GUID when the service was created. The partition ID is unique and does not change for the
 /// lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be
 /// different.</param>
 /// <param name="currentServiceOperation">Specifies the current active life-cycle operation on a stateful service
 /// replica or stateless service instance. Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close',
 /// 'Abort'</param>
 /// <param name="currentServiceOperationStartTimeUtc">The start time of the current service operation in UTC
 /// format.</param>
 /// <param name="reportedLoad">List of load reported by replica.</param>
 /// <param name="replicaId">Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify
 /// a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a
 /// replica gets dropped and another replica gets created on the same node for the same partition, it will get a
 /// different value for the id. Sometimes the id of a stateless service instance is also referred as a replica
 /// id.</param>
 /// <param name="currentReplicatorOperation">Specifies the operation currently being executed by the Replicator.
 /// Possible values include: 'Invalid', 'None', 'Open', 'ChangeRole', 'UpdateEpoch', 'Close', 'Abort', 'OnDataLoss',
 /// 'WaitForCatchup', 'Build'</param>
 /// <param name="readStatus">Specifies the access status of the partition. Possible values include: 'Invalid',
 /// 'Granted', 'ReconfigurationPending', 'NotPrimary', 'NoWriteQuorum'</param>
 /// <param name="writeStatus">Specifies the access status of the partition. Possible values include: 'Invalid',
 /// 'Granted', 'ReconfigurationPending', 'NotPrimary', 'NoWriteQuorum'</param>
 /// <param name="replicatorStatus">Represents a base class for primary or secondary replicator status.
 /// Contains information about the service fabric replicator like the replication/copy queue utilization, last
 /// acknowledgement received timestamp, etc.
 /// </param>
 /// <param name="replicaStatus">Key value store related information for the replica.</param>
 /// <param name="deployedServiceReplicaQueryResult">Information about a stateful service replica deployed on a
 /// node.</param>
 public DeployedStatefulServiceReplicaDetailInfo(
     ServiceName serviceName = default(ServiceName),
     PartitionId partitionId = default(PartitionId),
     ServiceOperationName?currentServiceOperation    = default(ServiceOperationName?),
     DateTime?currentServiceOperationStartTimeUtc    = default(DateTime?),
     IEnumerable <LoadMetricReportInfo> reportedLoad = default(IEnumerable <LoadMetricReportInfo>),
     ReplicaId replicaId = default(ReplicaId),
     ReplicatorOperationName?currentReplicatorOperation = default(ReplicatorOperationName?),
     PartitionAccessStatus?readStatus         = default(PartitionAccessStatus?),
     PartitionAccessStatus?writeStatus        = default(PartitionAccessStatus?),
     ReplicatorStatus replicatorStatus        = default(ReplicatorStatus),
     KeyValueStoreReplicaStatus replicaStatus = default(KeyValueStoreReplicaStatus),
     DeployedStatefulServiceReplicaInfo deployedServiceReplicaQueryResult = default(DeployedStatefulServiceReplicaInfo))
     : base(
         Common.ServiceKind.Stateful,
         serviceName,
         partitionId,
         currentServiceOperation,
         currentServiceOperationStartTimeUtc,
         reportedLoad)
 {
     this.ReplicaId = replicaId;
     this.CurrentReplicatorOperation = currentReplicatorOperation;
     this.ReadStatus       = readStatus;
     this.WriteStatus      = writeStatus;
     this.ReplicatorStatus = replicatorStatus;
     this.ReplicaStatus    = replicaStatus;
     this.DeployedServiceReplicaQueryResult = deployedServiceReplicaQueryResult;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the DeployedStatefulServiceReplicaInfo class.
 /// </summary>
 /// <param name="serviceName">The full name of the service with 'fabric:' URI scheme.</param>
 /// <param name="serviceTypeName">Name of the service type as specified in the service manifest.</param>
 /// <param name="serviceManifestName">The name of the service manifest in which this service type is defined.</param>
 /// <param name="codePackageName">The name of the code package that hosts this replica.</param>
 /// <param name="partitionId">An internal ID used by Service Fabric to uniquely identify a partition. This is a
 /// randomly generated GUID when the service was created. The partition ID is unique and does not change for the
 /// lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be
 /// different.</param>
 /// <param name="replicaStatus">The status of a replica of a service. Possible values include: 'Invalid', 'InBuild',
 /// 'Standby', 'Ready', 'Down', 'Dropped'</param>
 /// <param name="address">The last address returned by the replica in Open or ChangeRole.</param>
 /// <param name="servicePackageActivationId">The ActivationId of a deployed service package. If
 /// ServicePackageActivationMode specified at the time of creating the service
 /// is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of
 /// ServicePackageActivationId
 /// is always an empty string.
 /// </param>
 /// <param name="hostProcessId">Host process ID of the process that is hosting the replica. This will be zero if the
 /// replica is down. In hyper-v containers this host process ID will be from different kernel.</param>
 /// <param name="replicaId">Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify
 /// a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a
 /// replica gets dropped and another replica gets created on the same node for the same partition, it will get a
 /// different value for the id. Sometimes the id of a stateless service instance is also referred as a replica
 /// id.</param>
 /// <param name="replicaRole">The role of a replica of a stateful service. Possible values include: 'Unknown', 'None',
 /// 'Primary', 'IdleSecondary', 'ActiveSecondary'</param>
 /// <param name="reconfigurationInformation">Information about current reconfiguration like phase, type, previous
 /// configuration role of replica and reconfiguration start date time.</param>
 public DeployedStatefulServiceReplicaInfo(
     ServiceName serviceName     = default(ServiceName),
     string serviceTypeName      = default(string),
     string serviceManifestName  = default(string),
     string codePackageName      = default(string),
     PartitionId partitionId     = default(PartitionId),
     ReplicaStatus?replicaStatus = default(ReplicaStatus?),
     string address = default(string),
     string servicePackageActivationId = default(string),
     string hostProcessId    = default(string),
     ReplicaId replicaId     = default(ReplicaId),
     ReplicaRole?replicaRole = default(ReplicaRole?),
     ReconfigurationInformation reconfigurationInformation = default(ReconfigurationInformation))
     : base(
         Common.ServiceKind.Stateful,
         serviceName,
         serviceTypeName,
         serviceManifestName,
         codePackageName,
         partitionId,
         replicaStatus,
         address,
         servicePackageActivationId,
         hostProcessId)
 {
     this.ReplicaId   = replicaId;
     this.ReplicaRole = replicaRole;
     this.ReconfigurationInformation = reconfigurationInformation;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the ChaosReplicaRemovalScheduledEvent class.
 /// </summary>
 /// <param name="eventInstanceId">The identifier for the FabricEvent instance.</param>
 /// <param name="timeStamp">The time event was logged.</param>
 /// <param name="partitionId">An internal ID used by Service Fabric to uniquely identify a partition. This is a
 /// randomly generated GUID when the service was created. The partition ID is unique and does not change for the
 /// lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be
 /// different.</param>
 /// <param name="replicaId">Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify
 /// a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a
 /// replica gets dropped and another replica gets created on the same node for the same partition, it will get a
 /// different value for the id. Sometimes the id of a stateless service instance is also referred as a replica
 /// id.</param>
 /// <param name="faultGroupId">Id of fault group.</param>
 /// <param name="faultId">Id of fault.</param>
 /// <param name="serviceUri">Service name.</param>
 /// <param name="category">The category of event.</param>
 /// <param name="hasCorrelatedEvents">Shows there is existing related events available.</param>
 public ChaosReplicaRemovalScheduledEvent(
     Guid?eventInstanceId,
     DateTime?timeStamp,
     PartitionId partitionId,
     ReplicaId replicaId,
     Guid?faultGroupId,
     Guid?faultId,
     string serviceUri,
     string category          = default(string),
     bool?hasCorrelatedEvents = default(bool?))
     : base(
         eventInstanceId,
         timeStamp,
         Common.FabricEventKind.ChaosReplicaRemovalScheduled,
         partitionId,
         replicaId,
         category,
         hasCorrelatedEvents)
 {
     faultGroupId.ThrowIfNull(nameof(faultGroupId));
     faultId.ThrowIfNull(nameof(faultId));
     serviceUri.ThrowIfNull(nameof(serviceUri));
     this.FaultGroupId = faultGroupId;
     this.FaultId      = faultId;
     this.ServiceUri   = serviceUri;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the DeployedStatelessServiceInstanceInfo class.
 /// </summary>
 /// <param name="serviceName">The full name of the service with 'fabric:' URI scheme.</param>
 /// <param name="serviceTypeName">Name of the service type as specified in the service manifest.</param>
 /// <param name="serviceManifestName">The name of the service manifest in which this service type is defined.</param>
 /// <param name="codePackageName">The name of the code package that hosts this replica.</param>
 /// <param name="partitionId">An internal ID used by Service Fabric to uniquely identify a partition. This is a
 /// randomly generated GUID when the service was created. The partition ID is unique and does not change for the
 /// lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be
 /// different.</param>
 /// <param name="replicaStatus">The status of a replica of a service. Possible values include: 'Invalid', 'InBuild',
 /// 'Standby', 'Ready', 'Down', 'Dropped'</param>
 /// <param name="address">The last address returned by the replica in Open or ChangeRole.</param>
 /// <param name="servicePackageActivationId">The ActivationId of a deployed service package. If
 /// ServicePackageActivationMode specified at the time of creating the service
 /// is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of
 /// ServicePackageActivationId
 /// is always an empty string.
 /// </param>
 /// <param name="hostProcessId">Host process ID of the process that is hosting the replica. This will be zero if the
 /// replica is down. In hyper-v containers this host process ID will be from different kernel.</param>
 /// <param name="instanceId">Id of a stateless service instance. InstanceId is used by Service Fabric to uniquely
 /// identify an instance of a partition of a stateless service. It is unique within a partition and does not change for
 /// the lifetime of the instance. If the instance has failed over on the same or different node, it will get a
 /// different value for the InstanceId.</param>
 public DeployedStatelessServiceInstanceInfo(
     ServiceName serviceName     = default(ServiceName),
     string serviceTypeName      = default(string),
     string serviceManifestName  = default(string),
     string codePackageName      = default(string),
     PartitionId partitionId     = default(PartitionId),
     ReplicaStatus?replicaStatus = default(ReplicaStatus?),
     string address = default(string),
     string servicePackageActivationId = default(string),
     string hostProcessId = default(string),
     ReplicaId instanceId = default(ReplicaId))
     : base(
         Common.ServiceKind.Stateless,
         serviceName,
         serviceTypeName,
         serviceManifestName,
         codePackageName,
         partitionId,
         replicaStatus,
         address,
         servicePackageActivationId,
         hostProcessId)
 {
     this.InstanceId = instanceId;
 }
 /// <summary>
 /// Initializes a new instance of the StatefulServiceReplicaHealthState class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="partitionId">The ID of the partition to which this replica belongs.</param>
 /// <param name="replicaId">Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify
 /// a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a
 /// replica gets dropped and another replica gets created on the same node for the same partition, it will get a
 /// different value for the id. Sometimes the id of a stateless service instance is also referred as a replica
 /// id.</param>
 public StatefulServiceReplicaHealthState(
     HealthState?aggregatedHealthState = default(HealthState?),
     PartitionId partitionId           = default(PartitionId),
     ReplicaId replicaId = default(ReplicaId))
     : base(
         aggregatedHealthState,
         partitionId)
 {
     this.ReplicaId = replicaId;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the StatelessServiceInstanceHealthState class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="partitionId">The ID of the partition to which this replica belongs.</param>
 /// <param name="replicaId">Id of the stateless service instance on the wire this field is called ReplicaId.</param>
 public StatelessServiceInstanceHealthState(
     HealthState?aggregatedHealthState = default(HealthState?),
     PartitionId partitionId           = default(PartitionId),
     ReplicaId replicaId = default(ReplicaId))
     : base(
         Common.ServiceKind.Stateless,
         aggregatedHealthState,
         partitionId)
 {
     this.ReplicaId = replicaId;
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the StatefulServiceReplicaHealth class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="healthEvents">The list of health events reported on the entity.</param>
 /// <param name="unhealthyEvaluations">The unhealthy evaluations that show why the current aggregated health state was
 /// returned by Health Manager.</param>
 /// <param name="healthStatistics">Shows the health statistics for all children types of the queried entity.</param>
 /// <param name="partitionId">Id of the partition to which this replica belongs.</param>
 /// <param name="replicaId">Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify
 /// a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a
 /// replica gets dropped and another replica gets created on the same node for the same partition, it will get a
 /// different value for the id. Sometimes the id of a stateless service instance is also referred as a replica
 /// id.</param>
 public StatefulServiceReplicaHealth(
     HealthState?aggregatedHealthState      = default(HealthState?),
     IEnumerable <HealthEvent> healthEvents = default(IEnumerable <HealthEvent>),
     IEnumerable <HealthEvaluationWrapper> unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>),
     HealthStatistics healthStatistics = default(HealthStatistics),
     PartitionId partitionId           = default(PartitionId),
     ReplicaId replicaId = default(ReplicaId))
     : base(
         aggregatedHealthState,
         healthEvents,
         unhealthyEvaluations,
         healthStatistics,
         partitionId)
 {
     this.ReplicaId = replicaId;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the StatelessServiceInstanceInfo class.
 /// </summary>
 /// <param name="replicaStatus">The status of a replica of a service. Possible values include: 'Invalid', 'InBuild',
 /// 'Standby', 'Ready', 'Down', 'Dropped'</param>
 /// <param name="healthState">The health state of a Service Fabric entity such as Cluster, Node, Application, Service,
 /// Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="nodeName">The name of a Service Fabric node.</param>
 /// <param name="address">The address the replica is listening on.</param>
 /// <param name="lastInBuildDurationInSeconds">The last in build duration of the replica in seconds.</param>
 /// <param name="instanceId">Id of a stateless service instance. InstanceId is used by Service Fabric to uniquely
 /// identify an instance of a partition of a stateless service. It is unique within a partition and does not change for
 /// the lifetime of the instance. If the instance has failed over on the same or different node, it will get a
 /// different value for the InstanceId.</param>
 public StatelessServiceInstanceInfo(
     ReplicaStatus?replicaStatus = default(ReplicaStatus?),
     HealthState?healthState     = default(HealthState?),
     NodeName nodeName           = default(NodeName),
     string address = default(string),
     string lastInBuildDurationInSeconds = default(string),
     ReplicaId instanceId = default(ReplicaId))
     : base(
         Common.ServiceKind.Stateless,
         replicaStatus,
         healthState,
         nodeName,
         address,
         lastInBuildDurationInSeconds)
 {
     this.InstanceId = instanceId;
 }
 /// <summary>
 /// Initializes a new instance of the StatelessServiceInstanceHealth class.
 /// </summary>
 /// <param name="aggregatedHealthState">The HealthState representing the aggregated health state of the entity computed
 /// by Health Manager.
 /// The health evaluation of the entity reflects all events reported on the entity and its children (if any).
 /// The aggregation is done by applying the desired health policy.
 /// . Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'
 ///
 /// The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc.
 /// </param>
 /// <param name="healthEvents">The list of health events reported on the entity.</param>
 /// <param name="unhealthyEvaluations">The unhealthy evaluations that show why the current aggregated health state was
 /// returned by Health Manager.</param>
 /// <param name="healthStatistics">Shows the health statistics for all children types of the queried entity.</param>
 /// <param name="partitionId">Id of the partition to which this replica belongs.</param>
 /// <param name="instanceId">Id of a stateless service instance. InstanceId is used by Service Fabric to uniquely
 /// identify an instance of a partition of a stateless service. It is unique within a partition and does not change for
 /// the lifetime of the instance. If the instance has failed over on the same or different node, it will get a
 /// different value for the InstanceId.</param>
 public StatelessServiceInstanceHealth(
     HealthState?aggregatedHealthState      = default(HealthState?),
     IEnumerable <HealthEvent> healthEvents = default(IEnumerable <HealthEvent>),
     IEnumerable <HealthEvaluationWrapper> unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>),
     HealthStatistics healthStatistics = default(HealthStatistics),
     PartitionId partitionId           = default(PartitionId),
     ReplicaId instanceId = default(ReplicaId))
     : base(
         Common.ServiceKind.Stateless,
         aggregatedHealthState,
         healthEvents,
         unhealthyEvaluations,
         healthStatistics,
         partitionId)
 {
     this.InstanceId = instanceId;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the ReplicaEvent class.
 /// </summary>
 /// <param name="eventInstanceId">The identifier for the FabricEvent instance.</param>
 /// <param name="timeStamp">The time event was logged.</param>
 /// <param name="kind">The kind of FabricEvent.</param>
 /// <param name="partitionId">An internal ID used by Service Fabric to uniquely identify a partition. This is a
 /// randomly generated GUID when the service was created. The partition ID is unique and does not change for the
 /// lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be
 /// different.</param>
 /// <param name="replicaId">Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify
 /// a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a
 /// replica gets dropped and another replica gets created on the same node for the same partition, it will get a
 /// different value for the id. Sometimes the id of a stateless service instance is also referred as a replica
 /// id.</param>
 /// <param name="hasCorrelatedEvents">Shows there is existing related events available.</param>
 public ReplicaEvent(
     Guid?eventInstanceId,
     DateTime?timeStamp,
     FabricEventKind?kind,
     PartitionId partitionId,
     ReplicaId replicaId,
     bool?hasCorrelatedEvents = default(bool?))
     : base(
         eventInstanceId,
         timeStamp,
         Common.FabricEventKind.ReplicaEvent,
         hasCorrelatedEvents)
 {
     partitionId.ThrowIfNull(nameof(partitionId));
     replicaId.ThrowIfNull(nameof(replicaId));
     this.PartitionId = partitionId;
     this.ReplicaId   = replicaId;
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the StatefulReplicaHealthReportExpiredEvent class.
 /// </summary>
 /// <param name="eventInstanceId">The identifier for the FabricEvent instance.</param>
 /// <param name="timeStamp">The time event was logged.</param>
 /// <param name="partitionId">An internal ID used by Service Fabric to uniquely identify a partition. This is a
 /// randomly generated GUID when the service was created. The partition ID is unique and does not change for the
 /// lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be
 /// different.</param>
 /// <param name="replicaId">Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify
 /// a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a
 /// replica gets dropped and another replica gets created on the same node for the same partition, it will get a
 /// different value for the id. Sometimes the id of a stateless service instance is also referred as a replica
 /// id.</param>
 /// <param name="replicaInstanceId">Id of Replica instance.</param>
 /// <param name="sourceId">Id of report source.</param>
 /// <param name="property">Describes the property.</param>
 /// <param name="healthState">Describes the property health state.</param>
 /// <param name="timeToLiveMs">Time to live in milli-seconds.</param>
 /// <param name="sequenceNumber">Sequence number of report.</param>
 /// <param name="description">Description of report.</param>
 /// <param name="removeWhenExpired">Indicates the removal when it expires.</param>
 /// <param name="sourceUtcTimestamp">Source time.</param>
 /// <param name="category">The category of event.</param>
 /// <param name="hasCorrelatedEvents">Shows there is existing related events available.</param>
 public StatefulReplicaHealthReportExpiredEvent(
     Guid?eventInstanceId,
     DateTime?timeStamp,
     PartitionId partitionId,
     ReplicaId replicaId,
     long?replicaInstanceId,
     string sourceId,
     string property,
     string healthState,
     long?timeToLiveMs,
     long?sequenceNumber,
     string description,
     bool?removeWhenExpired,
     DateTime?sourceUtcTimestamp,
     string category          = default(string),
     bool?hasCorrelatedEvents = default(bool?))
     : base(
         eventInstanceId,
         timeStamp,
         Common.FabricEventKind.StatefulReplicaHealthReportExpired,
         partitionId,
         replicaId,
         category,
         hasCorrelatedEvents)
 {
     replicaInstanceId.ThrowIfNull(nameof(replicaInstanceId));
     sourceId.ThrowIfNull(nameof(sourceId));
     property.ThrowIfNull(nameof(property));
     healthState.ThrowIfNull(nameof(healthState));
     timeToLiveMs.ThrowIfNull(nameof(timeToLiveMs));
     sequenceNumber.ThrowIfNull(nameof(sequenceNumber));
     description.ThrowIfNull(nameof(description));
     removeWhenExpired.ThrowIfNull(nameof(removeWhenExpired));
     sourceUtcTimestamp.ThrowIfNull(nameof(sourceUtcTimestamp));
     this.ReplicaInstanceId  = replicaInstanceId;
     this.SourceId           = sourceId;
     this.Property           = property;
     this.HealthState        = healthState;
     this.TimeToLiveMs       = timeToLiveMs;
     this.SequenceNumber     = sequenceNumber;
     this.Description        = description;
     this.RemoveWhenExpired  = removeWhenExpired;
     this.SourceUtcTimestamp = sourceUtcTimestamp;
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the RemoteReplicatorStatus class.
 /// </summary>
 /// <param name="replicaId">Represents the replica ID of the remote secondary replicator.</param>
 /// <param name="lastAcknowledgementProcessedTimeUtc">The last timestamp (in UTC) when an acknowledgement from the
 /// secondary replicator was processed on the primary.
 /// UTC 0 represents an invalid value, indicating that no acknowledgement messages were ever processed.
 /// </param>
 /// <param name="lastReceivedReplicationSequenceNumber">The highest replication operation sequence number that the
 /// secondary has received from the primary.</param>
 /// <param name="lastAppliedReplicationSequenceNumber">The highest replication operation sequence number that the
 /// secondary has applied to its state.</param>
 /// <param name="isInBuild">A value that indicates whether the secondary replica is in the process of being
 /// built.</param>
 /// <param name="lastReceivedCopySequenceNumber">The highest copy operation sequence number that the secondary has
 /// received from the primary.
 /// A value of -1 implies that the secondary has received all copy operations.
 /// </param>
 /// <param name="lastAppliedCopySequenceNumber">The highest copy operation sequence number that the secondary has
 /// applied to its state.
 /// A value of -1 implies that the secondary has applied all copy operations and the copy process is complete.
 /// </param>
 /// <param name="remoteReplicatorAcknowledgementStatus">Represents the acknowledgment status for the remote secondary
 /// replicator.</param>
 public RemoteReplicatorStatus(
     ReplicaId replicaId = default(ReplicaId),
     DateTime?lastAcknowledgementProcessedTimeUtc = default(DateTime?),
     string lastReceivedReplicationSequenceNumber = default(string),
     string lastAppliedReplicationSequenceNumber  = default(string),
     bool?isInBuild = default(bool?),
     string lastReceivedCopySequenceNumber = default(string),
     string lastAppliedCopySequenceNumber  = default(string),
     RemoteReplicatorAcknowledgementStatus remoteReplicatorAcknowledgementStatus = default(RemoteReplicatorAcknowledgementStatus))
 {
     this.ReplicaId = replicaId;
     this.LastAcknowledgementProcessedTimeUtc   = lastAcknowledgementProcessedTimeUtc;
     this.LastReceivedReplicationSequenceNumber = lastReceivedReplicationSequenceNumber;
     this.LastAppliedReplicationSequenceNumber  = lastAppliedReplicationSequenceNumber;
     this.IsInBuild = isInBuild;
     this.LastReceivedCopySequenceNumber        = lastReceivedCopySequenceNumber;
     this.LastAppliedCopySequenceNumber         = lastAppliedCopySequenceNumber;
     this.RemoteReplicatorAcknowledgementStatus = remoteReplicatorAcknowledgementStatus;
 }
 /// <summary>
 /// Initializes a new instance of the DeployedStatelessServiceInstanceDetailInfo class.
 /// </summary>
 /// <param name="serviceName">Full hierarchical name of the service in URI format starting with `fabric:`.</param>
 /// <param name="partitionId">An internal ID used by Service Fabric to uniquely identify a partition. This is a
 /// randomly generated GUID when the service was created. The partition ID is unique and does not change for the
 /// lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be
 /// different.</param>
 /// <param name="currentServiceOperation">Specifies the current active life-cycle operation on a stateful service
 /// replica or stateless service instance. Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close',
 /// 'Abort'</param>
 /// <param name="currentServiceOperationStartTimeUtc">The start time of the current service operation in UTC
 /// format.</param>
 /// <param name="reportedLoad">List of load reported by replica.</param>
 /// <param name="instanceId">Id of a stateless service instance. InstanceId is used by Service Fabric to uniquely
 /// identify an instance of a partition of a stateless service. It is unique within a partition and does not change for
 /// the lifetime of the instance. If the instance has failed over on the same or different node, it will get a
 /// different value for the InstanceId.</param>
 /// <param name="deployedServiceReplicaQueryResult">Information about a stateless service instance deployed on a
 /// node.</param>
 public DeployedStatelessServiceInstanceDetailInfo(
     ServiceName serviceName = default(ServiceName),
     PartitionId partitionId = default(PartitionId),
     ServiceOperationName?currentServiceOperation    = default(ServiceOperationName?),
     DateTime?currentServiceOperationStartTimeUtc    = default(DateTime?),
     IEnumerable <LoadMetricReportInfo> reportedLoad = default(IEnumerable <LoadMetricReportInfo>),
     ReplicaId instanceId = default(ReplicaId),
     DeployedStatelessServiceInstanceInfo deployedServiceReplicaQueryResult = default(DeployedStatelessServiceInstanceInfo))
     : base(
         Common.ServiceKind.Stateless,
         serviceName,
         partitionId,
         currentServiceOperation,
         currentServiceOperationStartTimeUtc,
         reportedLoad)
 {
     this.InstanceId = instanceId;
     this.DeployedServiceReplicaQueryResult = deployedServiceReplicaQueryResult;
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the StatefulServiceReplicaInfo class.
 /// </summary>
 /// <param name="replicaStatus">The status of a replica of a service. Possible values include: 'Invalid', 'InBuild',
 /// 'Standby', 'Ready', 'Down', 'Dropped'</param>
 /// <param name="healthState">The health state of a Service Fabric entity such as Cluster, Node, Application, Service,
 /// Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="nodeName">The name of a Service Fabric node.</param>
 /// <param name="address">The address the replica is listening on.</param>
 /// <param name="lastInBuildDurationInSeconds">The last in build duration of the replica in seconds.</param>
 /// <param name="replicaRole">The role of a replica of a stateful service. Possible values include: 'Unknown', 'None',
 /// 'Primary', 'IdleSecondary', 'ActiveSecondary'</param>
 /// <param name="replicaId">Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify
 /// a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a
 /// replica gets dropped and another replica gets created on the same node for the same partition, it will get a
 /// different value for the id. Sometimes the id of a stateless service instance is also referred as a replica
 /// id.</param>
 public StatefulServiceReplicaInfo(
     ReplicaStatus?replicaStatus = default(ReplicaStatus?),
     HealthState?healthState     = default(HealthState?),
     NodeName nodeName           = default(NodeName),
     string address = default(string),
     string lastInBuildDurationInSeconds = default(string),
     ReplicaRole?replicaRole             = default(ReplicaRole?),
     ReplicaId replicaId = default(ReplicaId))
     : base(
         Common.ServiceKind.Stateful,
         replicaStatus,
         healthState,
         nodeName,
         address,
         lastInBuildDurationInSeconds)
 {
     this.ReplicaRole = replicaRole;
     this.ReplicaId   = replicaId;
 }