Class FullUpgradeMode
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.upgrade.modes.FullUpgradeMode
-
- All Implemented Interfaces:
UpgradeMode
public class FullUpgradeMode extends Object implements UpgradeMode
- Author:
- Eugene Petrenko (eugene.petrenko@gmail.com) Date: 02.09.11 20:03
-
-
Constructor Summary
Constructors Constructor Description FullUpgradeMode(UpdatePreparer preparer, PluginsRemover remover, PluginUnpackLocations locations, UpgradeFilesDownloader downloader, AgentVersionController controller, AgentConfiguration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddownloadUpdates(AgentUpdateInfoDifference difference, AgentUpdateInfo newVersionInfo)downloads required for update filesbooleanisApplicable(AgentUpdateInfoDifference difference, AgentUpdateInfo newVersionInfo)UpgradeOutcomeprepareUpgrade(AgentUpdateInfoDifference difference, AgentUpdateInfo newVersionInfo)Prepares upgrade of agent
-
-
-
Constructor Detail
-
FullUpgradeMode
public FullUpgradeMode(@NotNull UpdatePreparer preparer, @NotNull PluginsRemover remover, @NotNull PluginUnpackLocations locations, @NotNull UpgradeFilesDownloader downloader, @NotNull AgentVersionController controller, @NotNull AgentConfiguration config)
-
-
Method Detail
-
isApplicable
@Contract("_, null -> false") public boolean isApplicable(@Nullable AgentUpdateInfoDifference difference, @Nullable AgentUpdateInfo newVersionInfo)- Specified by:
isApplicablein interfaceUpgradeMode- Returns:
- true if specified upgrade mode can be applicable for specified upgrade update version and diff
-
downloadUpdates
public void downloadUpdates(@Nullable AgentUpdateInfoDifference difference, @Nullable AgentUpdateInfo newVersionInfo) throws UpgradeFailedExceptionDescription copied from interface:UpgradeModedownloads required for update files- Specified by:
downloadUpdatesin interfaceUpgradeMode- Throws:
UpgradeFailedException
-
prepareUpgrade
@NotNull public UpgradeOutcome prepareUpgrade(@Nullable AgentUpdateInfoDifference difference, @Nullable AgentUpdateInfo newVersionInfo) throws UpgradeFailedException
Description copied from interface:UpgradeModePrepares upgrade of agent- Specified by:
prepareUpgradein interfaceUpgradeMode- Parameters:
difference- config differences if computablenewVersionInfo- new version of agent downloaded from server or null- Returns:
- upgrade outcome or null if such upgrade mode is not possible
- Throws:
UpgradeFailedException- on upgrade error
-
-