Class DefaultUpgradeManager

    • Constructor Detail

      • DefaultUpgradeManager

        public DefaultUpgradeManager()
    • Method Detail

      • validateSchemaUpdateIfNeeded

        protected void validateSchemaUpdateIfNeeded()
                                             throws com.atlassian.config.ConfigurationException
        Specified by:
        validateSchemaUpdateIfNeeded in class AbstractUpgradeManager
        Throws:
        com.atlassian.config.ConfigurationException
      • updateSchemaIfNeeded

        protected void updateSchemaIfNeeded()
                                     throws com.atlassian.config.ConfigurationException
        Specified by:
        updateSchemaIfNeeded in class AbstractUpgradeManager
        Throws:
        com.atlassian.config.ConfigurationException
      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Overrides:
        afterPropertiesSet in class AbstractUpgradeManager
      • getRealBuildNumber

        protected String getRealBuildNumber()
        Specified by:
        getRealBuildNumber in class AbstractUpgradeManager
        Returns:
        The build number of the new version of Confluence being upgraded to. This number can be found in the default.properties of the new expanded WAR
      • setDatabaseBuildNumber

        public void setDatabaseBuildNumber()
        Description copied from interface: UpgradeManager
        Once installation is complete, we'll need to set the database build number in the database, so that a subsequent startup of Confluence is able to check that the home directory build number matches the database build number (see https://jira.atlassian.com/browse/CONF-13798).
      • setDatabaseBuildNumber

        protected void setDatabaseBuildNumber​(String databaseBuildNumber)
                                       throws Exception
        Description copied from class: AbstractUpgradeManager
        Once the upgrade is complete, we'll need to set the new database build number in the database.
        Specified by:
        setDatabaseBuildNumber in class AbstractUpgradeManager
        Parameters:
        databaseBuildNumber - The new database build number
        Throws:
        Exception - when there is any problem setting the database build number
      • initialUpgradeFinished

        protected void initialUpgradeFinished()
                                       throws Exception
        Update the pluginFrameworkDependent upgrade status based on whether there are any plugin framework dependent upgrade tasks to run.
        Overrides:
        initialUpgradeFinished in class AbstractUpgradeManager
        Throws:
        Exception - when setting the database or configuration build number fails
      • permitDatabaseUpgrades

        protected boolean permitDatabaseUpgrades()
        If we are in a clustered setup, only one node should be allowed to perform upgrades that affect the database. To enforce this, nodes will need to:
        • successfully acquire the cluster upgrade lock AND
        • successfully tag the build in the CONFVERSION table (this is a backup check, to help us detect rare cases where some cluster nodes are not communicating - producing multiple clusters)
        If the upgrade process fails before all database upgrade tasks are complete, and the user ignores those errors and restarts the server, the existing tag on the CONFVERSION table will prevent the upgrade
        Overrides:
        permitDatabaseUpgrades in class AbstractUpgradeManager
        Returns:
        True by default. Is overridden for cluster upgrades.
      • setCacheFlusher

        public void setCacheFlusher​(CacheFlusher cacheFlusher)
        Since:
        5.10
      • setEventPublisher

        public void setEventPublisher​(com.atlassian.event.api.EventPublisher eventPublisher)
      • setVersionHistoryDao

        public void setVersionHistoryDao​(VersionHistoryDao versionHistoryDao)
      • setClusterManager

        public void setClusterManager​(ClusterManager clusterManager)
      • setUpgradeGate

        public void setUpgradeGate​(UpgradeGate upgradeGate)
      • setRecoveryFileGenerator

        public void setRecoveryFileGenerator​(RecoveryFileGenerator recoveryFileGenerator)
      • setClusterConfigurationHelper

        public void setClusterConfigurationHelper​(ClusterConfigurationHelperInternal clusterConfigurationHelper)
        Setter method for clusterConfigurationHelper
        Parameters:
        clusterConfigurationHelper - the injected Spring bean
        Since:
        6.10.1
      • setConfluenceHome

        public void setConfluenceHome​(com.atlassian.dc.filestore.api.compat.FilesystemPath confluenceHome)