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 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
-
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:
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
-
-