Package com.atlassian.bitbucket.zdu
Interface RollingUpgradeService
public interface RollingUpgradeService
Describes a service for maintaining rolling upgrade state. A rolling upgrade can be performed by enabling upgrade
mode and then upgrading nodes to a higher patch version, one at a time. After all the nodes have been upgraded,
upgrade mode should be disabled to finalize the upgrade.
- Since:
- 8.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Disables upgrade mode if all the cluster nodes are on same version.void
Enables upgrade mode which allows cluster to be run in mixed mode i.e.Retrieve the applicationversion
when upgrade mode was enabled.boolean
-
Method Details
-
disableUpgradeMode
void disableUpgradeMode()Disables upgrade mode if all the cluster nodes are on same version. If this method is called when cluster nodes have different versions, an exception is thrown. If upgrade mode is already disabled, calling this method has no effect.- See Also:
-
enableUpgradeMode
void enableUpgradeMode()Enables upgrade mode which allows cluster to be run in mixed mode i.e. nodes with higher patch version thanoriginal version
will be able to join cluster while some other nodes may still be ongetOriginalVersion()
original version. After this method is called, current version will be saved and returned by subsequent calls togetOriginalVersion()
. If upgrade mode is already enabled, calling this method has no effect. -
getOriginalVersion
Retrieve the applicationversion
when upgrade mode was enabled.The version returned is the "base" version for the rolling upgrade. During rolling upgrade, some or all nodes might have been upgraded to newer version, but this value will represent the version before upgrade was started on any node. If upgrade mode is not currently
enabled
,Optional.empty()
will be returned.- Returns:
- the application
version
when upgrade mode was enabled, orOptional.empty()
if upgrade mode is not currently enabled
-
isUpgradeModeEnabled
boolean isUpgradeModeEnabled()- Returns:
- if upgrade mode is currently enabled or not.
- See Also:
-