public class DefaultUpgradeManager extends AbstractUpgradeManager
MINIMUM_SUPPORTED_UPGRADE_BUILD_NUMBER, MINIMUM_SUPPORTED_UPGRADE_VERSION
Constructor and Description |
---|
DefaultUpgradeManager() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected void |
beforeUpgrade() |
void |
entireUpgradeFinished()
Called when all immediate and deferred upgrade actions have been performed *if* an upgrade was needed.
|
protected String |
getDatabaseBuildNumber() |
protected String |
getRealBuildNumber() |
protected void |
initialUpgradeFinished()
Update the pluginFrameworkDependent upgrade status based on whether there are any plugin framework dependent upgrade tasks
to run.
|
boolean |
needUpgrade()
This method has a side effect of putting an entry into the published cache indicating whether
an upgrade is required or not.
|
protected boolean |
permitDatabaseUpgrades()
If we are in a clustered setup, only one node should be allowed to perform upgrades that affect the database.
|
protected void |
postUpgrade() |
protected void |
releaseSchemaReferences() |
protected List<UpgradeError> |
runUpgradePrerequisites()
Runs all upgrade prerequisites.
|
protected void |
runUpgradeTasks(List<UpgradeTask> upgradeTasks) |
void |
setCacheFlusher(CacheFlusher cacheFlusher) |
void |
setClusterConfigurationHelper(ClusterConfigurationHelperInternal clusterConfigurationHelper)
Setter method for clusterConfigurationHelper
|
void |
setClusterManager(ClusterManager clusterManager) |
void |
setDatabaseBuildNumber()
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).
|
protected void |
setDatabaseBuildNumber(String databaseBuildNumber)
Once the upgrade is complete, we'll need to set the new database build number in the database.
|
void |
setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher) |
void |
setRecoveryFileGenerator(RecoveryFileGenerator recoveryFileGenerator) |
void |
setSchemaHelper(ConfluenceSchemaHelper schemaHelper) |
void |
setUpgradeGate(UpgradeGate upgradeGate) |
void |
setVersionHistoryDao(VersionHistoryDao versionHistoryDao) |
protected void |
updateSchemaIfNeeded() |
protected void |
validateSchemaUpdateIfNeeded() |
configuredBuildNumberNewerThan, getAllUpgradeTasks, getAllUpgradeTasksInfo, getConfiguredBuildNumber, getErrors, getExportBuildNumber, getOldestSpaceImportAllowed, getPluginDependentUpgradeTasks, getPluginExportCompatibility, getPreSchemaUpgradeTasks, getSchemaUpgradeTasks, getUpgradeTasks, getUpgradeTasksToRun, isUpgraded, setApplicationConfig, setConfiguredBuildNumber, setPluginAccessor, setPluginDependentUpgradeTasks, setPreSchemaUpgradeTasks, setSchemaUpgradeTasks, setUpgradeTasks, taskNewerThan, upgrade, upgradeStarted, upgradeTaskSucceeded
public void setSchemaHelper(ConfluenceSchemaHelper schemaHelper)
protected void validateSchemaUpdateIfNeeded() throws com.atlassian.config.ConfigurationException
validateSchemaUpdateIfNeeded
in class AbstractUpgradeManager
com.atlassian.config.ConfigurationException
protected void updateSchemaIfNeeded() throws com.atlassian.config.ConfigurationException
updateSchemaIfNeeded
in class AbstractUpgradeManager
com.atlassian.config.ConfigurationException
protected void releaseSchemaReferences()
releaseSchemaReferences
in class AbstractUpgradeManager
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class AbstractUpgradeManager
protected String getRealBuildNumber()
getRealBuildNumber
in class AbstractUpgradeManager
protected String getDatabaseBuildNumber()
getDatabaseBuildNumber
in class AbstractUpgradeManager
AbstractUpgradeManager.getConfiguredBuildNumber()
.protected List<UpgradeError> runUpgradePrerequisites()
AbstractUpgradeManager
runUpgradePrerequisites
in class AbstractUpgradeManager
public boolean needUpgrade()
needUpgrade
in interface UpgradeManager
needUpgrade
in class AbstractUpgradeManager
public void setDatabaseBuildNumber()
UpgradeManager
protected void setDatabaseBuildNumber(String databaseBuildNumber) throws Exception
AbstractUpgradeManager
setDatabaseBuildNumber
in class AbstractUpgradeManager
databaseBuildNumber
- The new database build numberException
- when there is any problem setting the database build numberprotected void beforeUpgrade()
beforeUpgrade
in class AbstractUpgradeManager
protected void postUpgrade()
postUpgrade
in class AbstractUpgradeManager
protected void initialUpgradeFinished() throws Exception
initialUpgradeFinished
in class AbstractUpgradeManager
Exception
- when setting the database or configuration build number failspublic void entireUpgradeFinished()
UpgradeManager
entireUpgradeFinished
in interface UpgradeManager
entireUpgradeFinished
in class AbstractUpgradeManager
protected boolean permitDatabaseUpgrades()
permitDatabaseUpgrades
in class AbstractUpgradeManager
protected void runUpgradeTasks(List<UpgradeTask> upgradeTasks) throws UpgradeException
runUpgradeTasks
in class AbstractUpgradeManager
UpgradeException
public void setCacheFlusher(CacheFlusher cacheFlusher)
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
public void setVersionHistoryDao(VersionHistoryDao versionHistoryDao)
public void setClusterManager(ClusterManager clusterManager)
public void setUpgradeGate(UpgradeGate upgradeGate)
public void setRecoveryFileGenerator(RecoveryFileGenerator recoveryFileGenerator)
public void setClusterConfigurationHelper(ClusterConfigurationHelperInternal clusterConfigurationHelper)
clusterConfigurationHelper
- the injected Spring beanCopyright © 2003–2019 Atlassian. All rights reserved.