Class DefaultZduManager
- java.lang.Object
-
- com.atlassian.confluence.impl.cluster.DefaultZduManager
-
- All Implemented Interfaces:
ZduManager
public class DefaultZduManager extends Object implements ZduManager
- Since:
- 7.9
-
-
Constructor Summary
Constructors Constructor Description DefaultZduManager(ZduStatusDao zduStatusDao, com.atlassian.sal.api.ApplicationProperties applicationProperties, com.atlassian.event.api.EventPublisher eventPublisher, ClusterManager clusterManager, UpgradeFinalizationManager finalizationManager, SynchronizationManager synchronizationManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endUpgrade()
End an upgrade.Map<ClusterNodeInformation,CompletionStage<NodeZduInfo>>
getNodesZduInfo()
Gets zdu information from all nodes in the cluster.ZduStatus
getUpgradeStatus()
boolean
isPendingDatabaseFinalization()
Determines whether the database requires finalization upgrades tasks to run in order to upgrade.void
retryFinalization()
Retry running the finalization tasksZduStatus
startUpgrade()
Start an upgrade.
-
-
-
Constructor Detail
-
DefaultZduManager
public DefaultZduManager(ZduStatusDao zduStatusDao, com.atlassian.sal.api.ApplicationProperties applicationProperties, com.atlassian.event.api.EventPublisher eventPublisher, ClusterManager clusterManager, UpgradeFinalizationManager finalizationManager, SynchronizationManager synchronizationManager)
-
-
Method Detail
-
getUpgradeStatus
public ZduStatus getUpgradeStatus()
- Specified by:
getUpgradeStatus
in interfaceZduManager
- Returns:
- the current upgrade State. This will be STABLE if no state has been explicitly set
-
startUpgrade
public ZduStatus startUpgrade()
Description copied from interface:ZduManager
Start an upgrade. This will record the current cluster version and enable upgrade mode.- Specified by:
startUpgrade
in interfaceZduManager
- Returns:
- the new cluster upgrade status
-
endUpgrade
public void endUpgrade()
Description copied from interface:ZduManager
End an upgrade. This will set the upgrade mode to disabled.- Specified by:
endUpgrade
in interfaceZduManager
-
retryFinalization
public void retryFinalization()
Description copied from interface:ZduManager
Retry running the finalization tasks- Specified by:
retryFinalization
in interfaceZduManager
-
isPendingDatabaseFinalization
public boolean isPendingDatabaseFinalization()
Description copied from interface:ZduManager
Determines whether the database requires finalization upgrades tasks to run in order to upgrade. This is done by comparing the database build number with the Applications build number.- Specified by:
isPendingDatabaseFinalization
in interfaceZduManager
- Returns:
- true if the Application build number is higher than the database build number.
-
getNodesZduInfo
public Map<ClusterNodeInformation,CompletionStage<NodeZduInfo>> getNodesZduInfo()
Description copied from interface:ZduManager
Gets zdu information from all nodes in the cluster.- Specified by:
getNodesZduInfo
in interfaceZduManager
- Returns:
- Map of
ClusterNodeInformation
toCompletionStage
of the ZDU info from the node
-
-