Class DeploymentsInProgressServiceImpl
java.lang.Object
com.atlassian.bamboo.deployments.runtime.DeploymentsInProgressServiceImpl
- All Implemented Interfaces:
DeploymentsInProgressService
public class DeploymentsInProgressServiceImpl
extends Object
implements DeploymentsInProgressService
-
Constructor Summary
ConstructorsConstructorDescriptionDeploymentsInProgressServiceImpl(XStreamFactory xStreamFactory, FeatureManager featureManager) -
Method Summary
Modifier and TypeMethodDescriptionvoiddetachDeploymentFromAgent(long agentId) Detach running deployment (if any) from an agent that was assigned to it.@Nullable DeploymentInProgressgetDeploymentExecutingOnAgent(long agentId) getDeploymentExecutingOnEnvironment(long environmentId) Retrieve optional deployment running on a given environment@Nullable DeploymentInProgressgetDeploymentInProgressById(long deploymentResultId) @NotNull Iterable<DeploymentInProgress>voidonAgentAssigned(long deploymentResultId, long agentId) voidonDeploymentFinished(long deploymentResultId) voidonDeploymentStarted(long deploymentResultId, Date date) voidonDeploymentStopped(long deploymentResultId) voidonDeploymentTriggered(@NotNull DeploymentResult deploymentResult, @NotNull DeploymentVersion deploymentVersion, @NotNull Environment environment, @NotNull DeploymentProject deploymentProject) restoreState(@NotNull Set<Long> restorableResultsIds) Restores runtime state of deployments after server restart.
-
Constructor Details
-
DeploymentsInProgressServiceImpl
@Inject public DeploymentsInProgressServiceImpl(XStreamFactory xStreamFactory, FeatureManager featureManager)
-
-
Method Details
-
getDeploymentsInProgress
- Specified by:
getDeploymentsInProgressin interfaceDeploymentsInProgressService
-
onDeploymentTriggered
public void onDeploymentTriggered(@NotNull @NotNull DeploymentResult deploymentResult, @NotNull @NotNull DeploymentVersion deploymentVersion, @NotNull @NotNull Environment environment, @NotNull @NotNull DeploymentProject deploymentProject) - Specified by:
onDeploymentTriggeredin interfaceDeploymentsInProgressService
-
onDeploymentFinished
public void onDeploymentFinished(long deploymentResultId) - Specified by:
onDeploymentFinishedin interfaceDeploymentsInProgressService
-
onDeploymentStarted
- Specified by:
onDeploymentStartedin interfaceDeploymentsInProgressService
-
onAgentAssigned
public void onAgentAssigned(long deploymentResultId, long agentId) - Specified by:
onAgentAssignedin interfaceDeploymentsInProgressService
-
onDeploymentStopped
public void onDeploymentStopped(long deploymentResultId) - Specified by:
onDeploymentStoppedin interfaceDeploymentsInProgressService
-
getDeploymentExecutingOnAgent
- Specified by:
getDeploymentExecutingOnAgentin interfaceDeploymentsInProgressService
-
getDeploymentExecutingOnEnvironment
Description copied from interface:DeploymentsInProgressServiceRetrieve optional deployment running on a given environment- Specified by:
getDeploymentExecutingOnEnvironmentin interfaceDeploymentsInProgressService- Parameters:
environmentId- environment id
-
getDeploymentInProgressById
@Nullable public @Nullable DeploymentInProgress getDeploymentInProgressById(long deploymentResultId) - Specified by:
getDeploymentInProgressByIdin interfaceDeploymentsInProgressService
-
restoreState
Description copied from interface:DeploymentsInProgressServiceRestores runtime state of deployments after server restart.- Specified by:
restoreStatein interfaceDeploymentsInProgressService- Returns:
- keys of successfully restore results
-
detachDeploymentFromAgent
public void detachDeploymentFromAgent(long agentId) Description copied from interface:DeploymentsInProgressServiceDetach running deployment (if any) from an agent that was assigned to it. Makes it possible for orphaned build monitor to clean it up. On the other hand, if the deployment result is returned within grace period it can still be accepted.- Specified by:
detachDeploymentFromAgentin interfaceDeploymentsInProgressService
-