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