Class AgentOnlyUpgradeMode
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.upgrade.modes.AgentOnlyUpgradeMode
-
- All Implemented Interfaces:
UpgradeMode
public class AgentOnlyUpgradeMode extends Object implements UpgradeMode
- Author:
- Eugene Petrenko (eugene.petrenko@gmail.com) Date: 02.09.11 19:55
-
-
Constructor Summary
Constructors Constructor Description AgentOnlyUpgradeMode(AgentConfiguration config, UpgradeFilesDownloader downloader, UpdatePreparer preparer, AgentVersionController versionController, IncrementalPluginsUpgrade incrementalPluginsUpgrade)
-
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
-
AgentOnlyUpgradeMode
public AgentOnlyUpgradeMode(@NotNull AgentConfiguration config, @NotNull UpgradeFilesDownloader downloader, @NotNull UpdatePreparer preparer, @NotNull AgentVersionController versionController, @NotNull IncrementalPluginsUpgrade incrementalPluginsUpgrade)
-
-
Method Detail
-
isApplicable
@Contract("_, null -> false; 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
-
-