Class AgentVersionControllerImpl
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.upgrade.AgentVersionControllerImpl
-
- All Implemented Interfaces:
AgentVersionController
public class AgentVersionControllerImpl extends Object implements AgentVersionController
Created by Eugene Petrenko (eugene.petrenko@gmail.com) Date: 31.08.11 17:40
-
-
Constructor Summary
Constructors Constructor Description AgentVersionControllerImpl(AgentConfiguration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddropAgentVersion()Totally removes agent upgrade info to make agent be upgraded in the next startAgentUpdateInfoloadAgentUpdateInfo()Tries to load current agent version info.voidupdateAgentCoreForLauncherUpdate(AgentUpdateInfoDifference diff)Updates agent core part versionvoidupdateAgentPluginVersion(AgentUpdateInfoDifference diff, AgentUpdateInfo newInfo)Updates agent version info replacing plugins informationvoidupdateAgentVersion(AgentUpdateInfo newInfo)Updates agent version file by replacing all data in the original file with a given datavoidwriteVersoinForLauncerUpdate(AgentUpdateInfo newInfo)Prepares version info for agent update with launcher update procedure.
-
-
-
Constructor Detail
-
AgentVersionControllerImpl
public AgentVersionControllerImpl(@NotNull AgentConfiguration config)
-
-
Method Detail
-
loadAgentUpdateInfo
@Nullable public AgentUpdateInfo loadAgentUpdateInfo()
Description copied from interface:AgentVersionControllerTries to load current agent version info.- Specified by:
loadAgentUpdateInfoin interfaceAgentVersionController- Returns:
- version information or null
-
dropAgentVersion
public void dropAgentVersion()
Description copied from interface:AgentVersionControllerTotally removes agent upgrade info to make agent be upgraded in the next start- Specified by:
dropAgentVersionin interfaceAgentVersionController
-
updateAgentPluginVersion
public void updateAgentPluginVersion(@NotNull AgentUpdateInfoDifference diff, AgentUpdateInfo newInfo) throws UpgradeFailedExceptionDescription copied from interface:AgentVersionControllerUpdates agent version info replacing plugins information- Specified by:
updateAgentPluginVersionin interfaceAgentVersionController- Throws:
UpgradeFailedException- in error
-
updateAgentCoreForLauncherUpdate
public void updateAgentCoreForLauncherUpdate(@NotNull AgentUpdateInfoDifference diff) throws UpgradeFailedExceptionDescription copied from interface:AgentVersionControllerUpdates agent core part version- Specified by:
updateAgentCoreForLauncherUpdatein interfaceAgentVersionController- Throws:
UpgradeFailedException- on error
-
updateAgentVersion
public void updateAgentVersion(@NotNull AgentUpdateInfo newInfo) throws UpgradeFailedExceptionDescription copied from interface:AgentVersionControllerUpdates agent version file by replacing all data in the original file with a given data- Specified by:
updateAgentVersionin interfaceAgentVersionController- Parameters:
newInfo- new information to replace- Throws:
UpgradeFailedException- on error
-
writeVersoinForLauncerUpdate
public void writeVersoinForLauncerUpdate(@NotNull AgentUpdateInfo newInfo) throws UpgradeFailedExceptionDescription copied from interface:AgentVersionControllerPrepares version info for agent update with launcher update procedure.- Specified by:
writeVersoinForLauncerUpdatein interfaceAgentVersionController- Parameters:
newInfo- new version for upgrade- Throws:
UpgradeFailedException- on error
-
-