ApplicationUpgradePolicy Class

  • java.lang.Object
    • com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy

Implements

public final class ApplicationUpgradePolicy
implements JsonSerializable<ApplicationUpgradePolicy>

Describes the policy for a monitored application upgrade.

Constructor Summary

Constructor Description
ApplicationUpgradePolicy()

Creates an instance of ApplicationUpgradePolicy class.

Method Summary

Modifier and Type Method and Description
ArmApplicationHealthPolicy applicationHealthPolicy()

Get the applicationHealthPolicy property: Defines a health policy used to evaluate the health of an application or one of its children entities.

Boolean forceRestart()

Get the forceRestart property: If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).

static ApplicationUpgradePolicy fromJson(JsonReader jsonReader)

Reads an instance of ApplicationUpgradePolicy from the JsonReader.

Boolean recreateApplication()

Get the recreateApplication property: Determines whether the application should be recreated on update.

ArmRollingUpgradeMonitoringPolicy rollingUpgradeMonitoringPolicy()

Get the rollingUpgradeMonitoringPolicy property: The policy used for monitoring the application upgrade.

JsonWriter toJson(JsonWriter jsonWriter)
RollingUpgradeMode upgradeMode()

Get the upgradeMode property: The mode used to monitor health during a rolling upgrade.

String upgradeReplicaSetCheckTimeout()

Get the upgradeReplicaSetCheckTimeout property: The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues.

void validate()

Validates the instance.

ApplicationUpgradePolicy withApplicationHealthPolicy(ArmApplicationHealthPolicy applicationHealthPolicy)

Set the applicationHealthPolicy property: Defines a health policy used to evaluate the health of an application or one of its children entities.

ApplicationUpgradePolicy withForceRestart(Boolean forceRestart)

Set the forceRestart property: If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).

ApplicationUpgradePolicy withRecreateApplication(Boolean recreateApplication)

Set the recreateApplication property: Determines whether the application should be recreated on update.

ApplicationUpgradePolicy withRollingUpgradeMonitoringPolicy(ArmRollingUpgradeMonitoringPolicy rollingUpgradeMonitoringPolicy)

Set the rollingUpgradeMonitoringPolicy property: The policy used for monitoring the application upgrade.

ApplicationUpgradePolicy withUpgradeMode(RollingUpgradeMode upgradeMode)

Set the upgradeMode property: The mode used to monitor health during a rolling upgrade.

ApplicationUpgradePolicy withUpgradeReplicaSetCheckTimeout(String upgradeReplicaSetCheckTimeout)

Set the upgradeReplicaSetCheckTimeout property: The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues.

Methods inherited from java.lang.Object

Constructor Details

ApplicationUpgradePolicy

public ApplicationUpgradePolicy()

Creates an instance of ApplicationUpgradePolicy class.

Method Details

applicationHealthPolicy

public ArmApplicationHealthPolicy applicationHealthPolicy()

Get the applicationHealthPolicy property: Defines a health policy used to evaluate the health of an application or one of its children entities.

Returns:

the applicationHealthPolicy value.

forceRestart

public Boolean forceRestart()

Get the forceRestart property: If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).

Returns:

the forceRestart value.

fromJson

public static ApplicationUpgradePolicy fromJson(JsonReader jsonReader)

Reads an instance of ApplicationUpgradePolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ApplicationUpgradePolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ApplicationUpgradePolicy.

recreateApplication

public Boolean recreateApplication()

Get the recreateApplication property: Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed and it will result in availability loss.

Returns:

the recreateApplication value.

rollingUpgradeMonitoringPolicy

public ArmRollingUpgradeMonitoringPolicy rollingUpgradeMonitoringPolicy()

Get the rollingUpgradeMonitoringPolicy property: The policy used for monitoring the application upgrade.

Returns:

the rollingUpgradeMonitoringPolicy value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

upgradeMode

public RollingUpgradeMode upgradeMode()

Get the upgradeMode property: The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored.

Returns:

the upgradeMode value.

upgradeReplicaSetCheckTimeout

public String upgradeReplicaSetCheckTimeout()

Get the upgradeReplicaSetCheckTimeout property: The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer).

Returns:

the upgradeReplicaSetCheckTimeout value.

validate

public void validate()

Validates the instance.

withApplicationHealthPolicy

public ApplicationUpgradePolicy withApplicationHealthPolicy(ArmApplicationHealthPolicy applicationHealthPolicy)

Set the applicationHealthPolicy property: Defines a health policy used to evaluate the health of an application or one of its children entities.

Parameters:

applicationHealthPolicy - the applicationHealthPolicy value to set.

Returns:

the ApplicationUpgradePolicy object itself.

withForceRestart

public ApplicationUpgradePolicy withForceRestart(Boolean forceRestart)

Set the forceRestart property: If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).

Parameters:

forceRestart - the forceRestart value to set.

Returns:

the ApplicationUpgradePolicy object itself.

withRecreateApplication

public ApplicationUpgradePolicy withRecreateApplication(Boolean recreateApplication)

Set the recreateApplication property: Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed and it will result in availability loss.

Parameters:

recreateApplication - the recreateApplication value to set.

Returns:

the ApplicationUpgradePolicy object itself.

withRollingUpgradeMonitoringPolicy

public ApplicationUpgradePolicy withRollingUpgradeMonitoringPolicy(ArmRollingUpgradeMonitoringPolicy rollingUpgradeMonitoringPolicy)

Set the rollingUpgradeMonitoringPolicy property: The policy used for monitoring the application upgrade.

Parameters:

rollingUpgradeMonitoringPolicy - the rollingUpgradeMonitoringPolicy value to set.

Returns:

the ApplicationUpgradePolicy object itself.

withUpgradeMode

public ApplicationUpgradePolicy withUpgradeMode(RollingUpgradeMode upgradeMode)

Set the upgradeMode property: The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored.

Parameters:

upgradeMode - the upgradeMode value to set.

Returns:

the ApplicationUpgradePolicy object itself.

withUpgradeReplicaSetCheckTimeout

public ApplicationUpgradePolicy withUpgradeReplicaSetCheckTimeout(String upgradeReplicaSetCheckTimeout)

Set the upgradeReplicaSetCheckTimeout property: The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer).

Parameters:

upgradeReplicaSetCheckTimeout - the upgradeReplicaSetCheckTimeout value to set.

Returns:

the ApplicationUpgradePolicy object itself.

Applies to