StatefulServiceProperties Class

public final class StatefulServiceProperties
extends ServiceResourceProperties

The properties of a stateful service resource.

Constructor Summary

Constructor Description
StatefulServiceProperties()

Creates an instance of StatefulServiceProperties class.

Method Summary

Modifier and Type Method and Description
Boolean hasPersistedState()

Get the hasPersistedState property: A flag indicating whether this is a persistent service which stores states on the local disk.

Integer minReplicaSetSize()

Get the minReplicaSetSize property: The minimum replica set size as a number.

OffsetDateTime quorumLossWaitDuration()

Get the quorumLossWaitDuration property: The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format (hh:mm:ss.s).

OffsetDateTime replicaRestartWaitDuration()

Get the replicaRestartWaitDuration property: The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s).

OffsetDateTime standByReplicaKeepDuration()

Get the standByReplicaKeepDuration property: The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s).

Integer targetReplicaSetSize()

Get the targetReplicaSetSize property: The target replica set size as a number.

void validate()

Validates the instance.

StatefulServiceProperties withCorrelationScheme(List<ServiceCorrelationDescription> correlationScheme)

Set the correlationScheme property: A list that describes the correlation of the service with other services.

StatefulServiceProperties withDefaultMoveCost(MoveCost defaultMoveCost)

Set the defaultMoveCost property: Specifies the move cost for the service.

StatefulServiceProperties withHasPersistedState(Boolean hasPersistedState)

Set the hasPersistedState property: A flag indicating whether this is a persistent service which stores states on the local disk.

StatefulServiceProperties withMinReplicaSetSize(Integer minReplicaSetSize)

Set the minReplicaSetSize property: The minimum replica set size as a number.

StatefulServiceProperties withPartitionDescription(PartitionSchemeDescription partitionDescription)

Set the partitionDescription property: Describes how the service is partitioned.

StatefulServiceProperties withPlacementConstraints(String placementConstraints)

Set the placementConstraints property: The placement constraints as a string.

StatefulServiceProperties withQuorumLossWaitDuration(OffsetDateTime quorumLossWaitDuration)

Set the quorumLossWaitDuration property: The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format (hh:mm:ss.s).

StatefulServiceProperties withReplicaRestartWaitDuration(OffsetDateTime replicaRestartWaitDuration)

Set the replicaRestartWaitDuration property: The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s).

StatefulServiceProperties withServiceDnsName(String serviceDnsName)

Set the serviceDnsName property: Dns name used for the service.

StatefulServiceProperties withServiceLoadMetrics(List<ServiceLoadMetricDescription> serviceLoadMetrics)

Set the serviceLoadMetrics property: The service load metrics is given as an array of ServiceLoadMetricDescription objects.

StatefulServiceProperties withServicePackageActivationMode(ArmServicePackageActivationMode servicePackageActivationMode)

Set the servicePackageActivationMode property: The activation Mode of the service package.

StatefulServiceProperties withServicePlacementPolicies(List<ServicePlacementPolicyDescription> servicePlacementPolicies)

Set the servicePlacementPolicies property: A list that describes the correlation of the service with other services.

StatefulServiceProperties withServiceTypeName(String serviceTypeName)

Set the serviceTypeName property: The name of the service type.

StatefulServiceProperties withStandByReplicaKeepDuration(OffsetDateTime standByReplicaKeepDuration)

Set the standByReplicaKeepDuration property: The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s).

StatefulServiceProperties withTargetReplicaSetSize(Integer targetReplicaSetSize)

Set the targetReplicaSetSize property: The target replica set size as a number.

Methods inherited from ServiceResourceProperties

Methods inherited from ServiceResourcePropertiesBase

Methods inherited from java.lang.Object

Constructor Details

StatefulServiceProperties

public StatefulServiceProperties()

Creates an instance of StatefulServiceProperties class.

Method Details

hasPersistedState

public Boolean hasPersistedState()

Get the hasPersistedState property: A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false.

Returns:

the hasPersistedState value.

minReplicaSetSize

public Integer minReplicaSetSize()

Get the minReplicaSetSize property: The minimum replica set size as a number.

Returns:

the minReplicaSetSize value.

quorumLossWaitDuration

public OffsetDateTime quorumLossWaitDuration()

Get the quorumLossWaitDuration property: The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format (hh:mm:ss.s).

Returns:

the quorumLossWaitDuration value.

replicaRestartWaitDuration

public OffsetDateTime replicaRestartWaitDuration()

Get the replicaRestartWaitDuration property: The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s).

Returns:

the replicaRestartWaitDuration value.

standByReplicaKeepDuration

public OffsetDateTime standByReplicaKeepDuration()

Get the standByReplicaKeepDuration property: The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s).

Returns:

the standByReplicaKeepDuration value.

targetReplicaSetSize

public Integer targetReplicaSetSize()

Get the targetReplicaSetSize property: The target replica set size as a number.

Returns:

the targetReplicaSetSize value.

validate

public void validate()

Validates the instance.

Overrides:

StatefulServiceProperties.validate()

withCorrelationScheme

public StatefulServiceProperties withCorrelationScheme(List correlationScheme)

Set the correlationScheme property: A list that describes the correlation of the service with other services.

Overrides:

StatefulServiceProperties.withCorrelationScheme(List<ServiceCorrelationDescription> correlationScheme)

Parameters:

correlationScheme

withDefaultMoveCost

public StatefulServiceProperties withDefaultMoveCost(MoveCost defaultMoveCost)

Set the defaultMoveCost property: Specifies the move cost for the service.

Overrides:

StatefulServiceProperties.withDefaultMoveCost(MoveCost defaultMoveCost)

Parameters:

defaultMoveCost

withHasPersistedState

public StatefulServiceProperties withHasPersistedState(Boolean hasPersistedState)

Set the hasPersistedState property: A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false.

Parameters:

hasPersistedState - the hasPersistedState value to set.

Returns:

the StatefulServiceProperties object itself.

withMinReplicaSetSize

public StatefulServiceProperties withMinReplicaSetSize(Integer minReplicaSetSize)

Set the minReplicaSetSize property: The minimum replica set size as a number.

Parameters:

minReplicaSetSize - the minReplicaSetSize value to set.

Returns:

the StatefulServiceProperties object itself.

withPartitionDescription

public StatefulServiceProperties withPartitionDescription(PartitionSchemeDescription partitionDescription)

Set the partitionDescription property: Describes how the service is partitioned.

Overrides:

StatefulServiceProperties.withPartitionDescription(PartitionSchemeDescription partitionDescription)

Parameters:

partitionDescription

withPlacementConstraints

public StatefulServiceProperties withPlacementConstraints(String placementConstraints)

Set the placementConstraints property: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".

Overrides:

StatefulServiceProperties.withPlacementConstraints(String placementConstraints)

Parameters:

placementConstraints

withQuorumLossWaitDuration

public StatefulServiceProperties withQuorumLossWaitDuration(OffsetDateTime quorumLossWaitDuration)

Set the quorumLossWaitDuration property: The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format (hh:mm:ss.s).

Parameters:

quorumLossWaitDuration - the quorumLossWaitDuration value to set.

Returns:

the StatefulServiceProperties object itself.

withReplicaRestartWaitDuration

public StatefulServiceProperties withReplicaRestartWaitDuration(OffsetDateTime replicaRestartWaitDuration)

Set the replicaRestartWaitDuration property: The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s).

Parameters:

replicaRestartWaitDuration - the replicaRestartWaitDuration value to set.

Returns:

the StatefulServiceProperties object itself.

withServiceDnsName

public StatefulServiceProperties withServiceDnsName(String serviceDnsName)

Set the serviceDnsName property: Dns name used for the service. If this is specified, then the service can be accessed via its DNS name instead of service name.

Overrides:

StatefulServiceProperties.withServiceDnsName(String serviceDnsName)

Parameters:

serviceDnsName

withServiceLoadMetrics

public StatefulServiceProperties withServiceLoadMetrics(List serviceLoadMetrics)

Set the serviceLoadMetrics property: The service load metrics is given as an array of ServiceLoadMetricDescription objects.

Overrides:

StatefulServiceProperties.withServiceLoadMetrics(List<ServiceLoadMetricDescription> serviceLoadMetrics)

Parameters:

serviceLoadMetrics

withServicePackageActivationMode

public StatefulServiceProperties withServicePackageActivationMode(ArmServicePackageActivationMode servicePackageActivationMode)

Set the servicePackageActivationMode property: The activation Mode of the service package.

Overrides:

StatefulServiceProperties.withServicePackageActivationMode(ArmServicePackageActivationMode servicePackageActivationMode)

Parameters:

servicePackageActivationMode

withServicePlacementPolicies

public StatefulServiceProperties withServicePlacementPolicies(List servicePlacementPolicies)

Set the servicePlacementPolicies property: A list that describes the correlation of the service with other services.

Overrides:

StatefulServiceProperties.withServicePlacementPolicies(List<ServicePlacementPolicyDescription> servicePlacementPolicies)

Parameters:

servicePlacementPolicies

withServiceTypeName

public StatefulServiceProperties withServiceTypeName(String serviceTypeName)

Set the serviceTypeName property: The name of the service type.

Overrides:

StatefulServiceProperties.withServiceTypeName(String serviceTypeName)

Parameters:

serviceTypeName

withStandByReplicaKeepDuration

public StatefulServiceProperties withStandByReplicaKeepDuration(OffsetDateTime standByReplicaKeepDuration)

Set the standByReplicaKeepDuration property: The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s).

Parameters:

standByReplicaKeepDuration - the standByReplicaKeepDuration value to set.

Returns:

the StatefulServiceProperties object itself.

withTargetReplicaSetSize

public StatefulServiceProperties withTargetReplicaSetSize(Integer targetReplicaSetSize)

Set the targetReplicaSetSize property: The target replica set size as a number.

Parameters:

targetReplicaSetSize - the targetReplicaSetSize value to set.

Returns:

the StatefulServiceProperties object itself.

Applies to