Class OldServerUpgradeMode
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.upgrade.modes.OldServerUpgradeMode
-
- All Implemented Interfaces:
UpgradeMode
public class OldServerUpgradeMode extends Object implements UpgradeMode
- Author:
- Eugene Petrenko (eugene.petrenko@gmail.com) Date: 02.09.11 20:08
-
-
Constructor Summary
Constructors Constructor Description OldServerUpgradeMode(UpgradeFilesDownloader downloader, AgentConfiguration config, UpdatePreparer preparer, AgentVersionController controller, PluginsRemover remover, PluginUnpackLocations locations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
downloadUpdates(AgentUpdateInfoDifference difference, AgentUpdateInfo newVersionInfo)
downloads required for update filesboolean
isApplicable(AgentUpdateInfoDifference difference, AgentUpdateInfo newVersionInfo)
UpgradeOutcome
prepareUpgrade(AgentUpdateInfoDifference difference, AgentUpdateInfo newVersionInfo)
Prepares upgrade of agent
-
-
-
Constructor Detail
-
OldServerUpgradeMode
public OldServerUpgradeMode(@NotNull UpgradeFilesDownloader downloader, @NotNull AgentConfiguration config, @NotNull UpdatePreparer preparer, @NotNull AgentVersionController controller, @NotNull PluginsRemover remover, @NotNull PluginUnpackLocations locations)
-
-
Method Detail
-
isApplicable
public boolean isApplicable(@Nullable AgentUpdateInfoDifference difference, @Nullable AgentUpdateInfo newVersionInfo)
- Specified by:
isApplicable
in 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 UpgradeFailedException
Description copied from interface:UpgradeMode
downloads required for update files- Specified by:
downloadUpdates
in interfaceUpgradeMode
- Throws:
UpgradeFailedException
-
prepareUpgrade
@NotNull public UpgradeOutcome prepareUpgrade(@Nullable AgentUpdateInfoDifference difference, @Nullable AgentUpdateInfo newVersionInfo) throws UpgradeFailedException
Description copied from interface:UpgradeMode
Prepares upgrade of agent- Specified by:
prepareUpgrade
in 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
-
-