com.atlassian.confluence.upgrade.impl
Class DefaultUpgradeManager
java.lang.Object
com.atlassian.upgrade.AbstractUpgradeManager
com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager
- All Implemented Interfaces:
- UpgradeManager
- public class DefaultUpgradeManager
- extends AbstractUpgradeManager
Methods inherited from class com.atlassian.upgrade.AbstractUpgradeManager |
doUpgrade, getConfiguredBuildNumber, getErrors, getSchemaUpgradeTasks, getUpgradeTasks, needUpgrade, setApplicationConfig, setConfiguredBuildNumber, setPreSchemaUpgradeTasks, setSchemaHelper, setSchemaUpgradeTasks, setUpgradeTasks, upgradeFinished, upgradeSchema, upgradeStarted, upgradeTaskFailed, upgradeTaskSucceeded |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static final org.apache.log4j.Category log
CLUSTER_UPGRADE_LOCK
public static final String CLUSTER_UPGRADE_LOCK
- See Also:
- Constant Field Values
DefaultUpgradeManager
public DefaultUpgradeManager()
getRealBuildNumber
protected String getRealBuildNumber()
getDatabaseBuildNumber
protected String getDatabaseBuildNumber()
isUpgradeAllowed
public boolean isUpgradeAllowed()
upgrade
public void upgrade(JohnsonEventContainer johnson)
throws UpgradeException
- Throws:
UpgradeException
setDatabaseBuildNumber
protected void setDatabaseBuildNumber(String databaseBuildNumber)
throws Exception
- Throws:
Exception
postUpgrade
protected void postUpgrade()
permitDatabaseUpgrades
protected boolean permitDatabaseUpgrades()
throws UpgradeException
- 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
- Throws:
UpgradeException
setCacheManager
public void setCacheManager(CacheManager cacheManager)
setEventManager
public void setEventManager(EventManager eventManager)
setVersionHistoryDao
public void setVersionHistoryDao(VersionHistoryDao versionHistoryDao)
setClusterManager
public void setClusterManager(ClusterManager clusterManager)