/// <summary>
 /// Initializes a new instance of the BackupInfo class.
 /// </summary>
 /// <param name="backupId">Unique backup ID .</param>
 /// <param name="backupChainId">Unique backup chain ID. All backups part of the same chain has the same backup chain
 /// id. A backup chain is comprised of 1 full backup and multiple incremental backups.</param>
 /// <param name="applicationName">Name of the Service Fabric application this partition backup belongs to.</param>
 /// <param name="serviceName">Name of the Service Fabric service this partition backup belongs to.</param>
 /// <param name="partitionInformation">Information about the partition to which this backup belongs to</param>
 /// <param name="backupLocation">Location of the backup, relative to the backup store.</param>
 /// <param name="backupType">Describes the type of backup, whether its full or incremental.
 /// . Possible values include: 'Invalid', 'Full', 'Incremental'</param>
 /// <param name="epochOfLastBackupRecord">Epoch of the last record in this backup.</param>
 /// <param name="lsnOfLastBackupRecord">LSN of the last record in this backup.</param>
 /// <param name="creationTimeUtc">The date time when this backup was taken.</param>
 /// <param name="serviceManifestVersion">Manifest Version of the service this partition backup belongs to.</param>
 /// <param name="failureError">Denotes the failure encountered in getting backup point information.</param>
 public BackupInfo(
     Guid?backupId          = default(Guid?),
     Guid?backupChainId     = default(Guid?),
     string applicationName = default(string),
     string serviceName     = default(string),
     PartitionInformation partitionInformation = default(PartitionInformation),
     string backupLocation         = default(string),
     BackupType?backupType         = default(BackupType?),
     Epoch epochOfLastBackupRecord = default(Epoch),
     string lsnOfLastBackupRecord  = default(string),
     DateTime?creationTimeUtc      = default(DateTime?),
     string serviceManifestVersion = default(string),
     FabricErrorError failureError = default(FabricErrorError))
 {
     this.BackupId                = backupId;
     this.BackupChainId           = backupChainId;
     this.ApplicationName         = applicationName;
     this.ServiceName             = serviceName;
     this.PartitionInformation    = partitionInformation;
     this.BackupLocation          = backupLocation;
     this.BackupType              = backupType;
     this.EpochOfLastBackupRecord = epochOfLastBackupRecord;
     this.LsnOfLastBackupRecord   = lsnOfLastBackupRecord;
     this.CreationTimeUtc         = creationTimeUtc;
     this.ServiceManifestVersion  = serviceManifestVersion;
     this.FailureError            = failureError;
 }
 /// <summary>
 /// Initializes a new instance of the ServicePartitionInfo class.
 /// </summary>
 /// <param name="serviceKind">The kind of service (Stateless or Stateful).</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="partitionStatus">The status of the service fabric service partition. Possible values include:
 /// 'Invalid', 'Ready', 'NotReady', 'InQuorumLoss', 'Reconfiguring', 'Deleting'</param>
 /// <param name="partitionInformation">Information about the partition identity, partitioning scheme and keys supported
 /// by it.</param>
 protected ServicePartitionInfo(
     ServiceKind?serviceKind,
     HealthState?healthState = default(HealthState?),
     ServicePartitionStatus?partitionStatus    = default(ServicePartitionStatus?),
     PartitionInformation partitionInformation = default(PartitionInformation))
 {
     serviceKind.ThrowIfNull(nameof(serviceKind));
     this.ServiceKind          = serviceKind;
     this.HealthState          = healthState;
     this.PartitionStatus      = partitionStatus;
     this.PartitionInformation = partitionInformation;
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the StatelessServicePartitionInfo class.
 /// </summary>
 /// <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="partitionStatus">The status of the service fabric service partition. Possible values include:
 /// 'Invalid', 'Ready', 'NotReady', 'InQuorumLoss', 'Reconfiguring', 'Deleting'</param>
 /// <param name="partitionInformation">Information about the partition identity, partitioning scheme and keys supported
 /// by it.</param>
 /// <param name="instanceCount">Number of instances of this partition.</param>
 public StatelessServicePartitionInfo(
     HealthState?healthState = default(HealthState?),
     ServicePartitionStatus?partitionStatus    = default(ServicePartitionStatus?),
     PartitionInformation partitionInformation = default(PartitionInformation),
     long?instanceCount = default(long?))
     : base(
         Common.ServiceKind.Stateless,
         healthState,
         partitionStatus,
         partitionInformation)
 {
     this.InstanceCount = instanceCount;
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the ResolvedServicePartition class.
 /// </summary>
 /// <param name="name">The full name of the service with 'fabric:' URI scheme.</param>
 /// <param name="partitionInformation">A representation of the resolved partition.</param>
 /// <param name="endpoints">List of resolved service endpoints of a service partition.</param>
 /// <param name="version">The version of this resolved service partition result. This version should be passed in the
 /// next time the ResolveService call is made via the PreviousRspVersion query parameter.</param>
 public ResolvedServicePartition(
     ServiceName name,
     PartitionInformation partitionInformation,
     IEnumerable <ResolvedServiceEndpoint> endpoints,
     string version)
 {
     name.ThrowIfNull(nameof(name));
     partitionInformation.ThrowIfNull(nameof(partitionInformation));
     endpoints.ThrowIfNull(nameof(endpoints));
     version.ThrowIfNull(nameof(version));
     this.Name = name;
     this.PartitionInformation = partitionInformation;
     this.Endpoints            = endpoints;
     this.Version = version;
 }
 /// <summary>
 /// Initializes a new instance of the StatefulServicePartitionInfo class.
 /// </summary>
 /// <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="partitionStatus">The status of the service fabric service partition. Possible values include:
 /// 'Invalid', 'Ready', 'NotReady', 'InQuorumLoss', 'Reconfiguring', 'Deleting'</param>
 /// <param name="partitionInformation">Information about the partition identity, partitioning scheme and keys supported
 /// by it.</param>
 /// <param name="targetReplicaSetSize">The target replica set size as a number.</param>
 /// <param name="minReplicaSetSize">The minimum replica set size as a number.</param>
 /// <param name="lastQuorumLossDuration">The duration for which this partition was in quorum loss. If the partition is
 /// currently in quorum loss, it returns the duration since it has been in that state. This field is using ISO8601
 /// format for specifying the duration.</param>
 /// <param name="currentConfigurationEpoch">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.
 /// </param>
 public StatefulServicePartitionInfo(
     HealthState?healthState = default(HealthState?),
     ServicePartitionStatus?partitionStatus    = default(ServicePartitionStatus?),
     PartitionInformation partitionInformation = default(PartitionInformation),
     long?targetReplicaSetSize       = default(long?),
     long?minReplicaSetSize          = default(long?),
     TimeSpan?lastQuorumLossDuration = default(TimeSpan?),
     Epoch currentConfigurationEpoch = default(Epoch))
     : base(
         Common.ServiceKind.Stateful,
         healthState,
         partitionStatus,
         partitionInformation)
 {
     this.TargetReplicaSetSize      = targetReplicaSetSize;
     this.MinReplicaSetSize         = minReplicaSetSize;
     this.LastQuorumLossDuration    = lastQuorumLossDuration;
     this.CurrentConfigurationEpoch = currentConfigurationEpoch;
 }
 /// <summary>
 /// Initializes a new instance of the StatefulServicePartitionInfo class.
 /// </summary>
 /// <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="partitionStatus">The status of the service fabric service partition. Possible values include:
 /// 'Invalid', 'Ready', 'NotReady', 'InQuorumLoss', 'Reconfiguring', 'Deleting'</param>
 /// <param name="partitionInformation">Information about the partition identity, partitioning scheme and keys supported
 /// by it.</param>
 /// <param name="targetReplicaSetSize">The target replica set size as a number.</param>
 /// <param name="minReplicaSetSize">The minimum replica set size as a number.</param>
 /// <param name="auxiliaryReplicaCount">The auxiliary replica count as a number. To use Auxiliary replicas the
 /// following must be true, AuxiliaryReplicaCount &lt; (TargetReplicaSetSize+1)/2 and TargetReplicaSetSize >=3.</param>
 /// <param name="lastQuorumLossDuration">The duration for which this partition was in quorum loss. If the partition is
 /// currently in quorum loss, it returns the duration since it has been in that state. This field is using ISO8601
 /// format for specifying the duration.</param>
 /// <param name="primaryEpoch">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.
 /// </param>
 public StatefulServicePartitionInfo(
     HealthState?healthState = default(HealthState?),
     ServicePartitionStatus?partitionStatus    = default(ServicePartitionStatus?),
     PartitionInformation partitionInformation = default(PartitionInformation),
     long?targetReplicaSetSize       = default(long?),
     long?minReplicaSetSize          = default(long?),
     long?auxiliaryReplicaCount      = default(long?),
     TimeSpan?lastQuorumLossDuration = default(TimeSpan?),
     Epoch primaryEpoch = default(Epoch))
     : base(
         Common.ServiceKind.Stateful,
         healthState,
         partitionStatus,
         partitionInformation)
 {
     this.TargetReplicaSetSize   = targetReplicaSetSize;
     this.MinReplicaSetSize      = minReplicaSetSize;
     this.AuxiliaryReplicaCount  = auxiliaryReplicaCount;
     this.LastQuorumLossDuration = lastQuorumLossDuration;
     this.PrimaryEpoch           = primaryEpoch;
 }