Class DeploymentsInProgressServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.deployments.runtime.DeploymentsInProgressServiceImpl
-
- All Implemented Interfaces:
DeploymentsInProgressService
public class DeploymentsInProgressServiceImpl extends Object implements DeploymentsInProgressService
-
-
Constructor Summary
Constructors Constructor Description DeploymentsInProgressServiceImpl(XStreamFactory xStreamFactory, FeatureManager featureManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddetachDeploymentFromAgent(long agentId)Detach running deployment (if any) from an agent that was assigned to it.@Nullable DeploymentInProgressgetDeploymentExecutingOnAgent(long agentId)Optional<DeploymentInProgress>getDeploymentExecutingOnEnvironment(long environmentId)Retrieve optional deployment running on a given environment@Nullable DeploymentInProgressgetDeploymentInProgressById(long deploymentResultId)@NotNull Iterable<DeploymentInProgress>getDeploymentsInProgress()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)Set<DeploymentResultKey>restoreState(@NotNull Set<Long> restorableResultsIds)Restores runtime state of deployments after server restart.
-
-
-
Constructor Detail
-
DeploymentsInProgressServiceImpl
@Inject public DeploymentsInProgressServiceImpl(XStreamFactory xStreamFactory, FeatureManager featureManager)
-
-
Method Detail
-
getDeploymentsInProgress
@NotNull public @NotNull Iterable<DeploymentInProgress> 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
public void onDeploymentStarted(long deploymentResultId, Date date)- 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
@Nullable public @Nullable DeploymentInProgress getDeploymentExecutingOnAgent(long agentId)
- Specified by:
getDeploymentExecutingOnAgentin interfaceDeploymentsInProgressService
-
getDeploymentExecutingOnEnvironment
public Optional<DeploymentInProgress> getDeploymentExecutingOnEnvironment(long environmentId)
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
public Set<DeploymentResultKey> restoreState(@NotNull @NotNull Set<Long> restorableResultsIds)
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
-
-