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 void
detachDeploymentFromAgent(long agentId)
Detach running deployment (if any) from an agent that was assigned to it.@Nullable DeploymentInProgress
getDeploymentExecutingOnAgent(long agentId)
Optional<DeploymentInProgress>
getDeploymentExecutingOnEnvironment(long environmentId)
Retrieve optional deployment running on a given environment@Nullable DeploymentInProgress
getDeploymentInProgressById(long deploymentResultId)
@NotNull Iterable<DeploymentInProgress>
getDeploymentsInProgress()
void
onAgentAssigned(long deploymentResultId, long agentId)
void
onDeploymentFinished(long deploymentResultId)
void
onDeploymentStarted(long deploymentResultId, Date date)
void
onDeploymentStopped(long deploymentResultId)
void
onDeploymentTriggered(@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:
getDeploymentsInProgress
in interfaceDeploymentsInProgressService
-
onDeploymentTriggered
public void onDeploymentTriggered(@NotNull @NotNull DeploymentResult deploymentResult, @NotNull @NotNull DeploymentVersion deploymentVersion, @NotNull @NotNull Environment environment, @NotNull @NotNull DeploymentProject deploymentProject)
- Specified by:
onDeploymentTriggered
in interfaceDeploymentsInProgressService
-
onDeploymentFinished
public void onDeploymentFinished(long deploymentResultId)
- Specified by:
onDeploymentFinished
in interfaceDeploymentsInProgressService
-
onDeploymentStarted
public void onDeploymentStarted(long deploymentResultId, Date date)
- Specified by:
onDeploymentStarted
in interfaceDeploymentsInProgressService
-
onAgentAssigned
public void onAgentAssigned(long deploymentResultId, long agentId)
- Specified by:
onAgentAssigned
in interfaceDeploymentsInProgressService
-
onDeploymentStopped
public void onDeploymentStopped(long deploymentResultId)
- Specified by:
onDeploymentStopped
in interfaceDeploymentsInProgressService
-
getDeploymentExecutingOnAgent
@Nullable public @Nullable DeploymentInProgress getDeploymentExecutingOnAgent(long agentId)
- Specified by:
getDeploymentExecutingOnAgent
in interfaceDeploymentsInProgressService
-
getDeploymentExecutingOnEnvironment
public Optional<DeploymentInProgress> getDeploymentExecutingOnEnvironment(long environmentId)
Description copied from interface:DeploymentsInProgressService
Retrieve optional deployment running on a given environment- Specified by:
getDeploymentExecutingOnEnvironment
in interfaceDeploymentsInProgressService
- Parameters:
environmentId
- environment id
-
getDeploymentInProgressById
@Nullable public @Nullable DeploymentInProgress getDeploymentInProgressById(long deploymentResultId)
- Specified by:
getDeploymentInProgressById
in interfaceDeploymentsInProgressService
-
restoreState
public Set<DeploymentResultKey> restoreState(@NotNull @NotNull Set<Long> restorableResultsIds)
Description copied from interface:DeploymentsInProgressService
Restores runtime state of deployments after server restart.- Specified by:
restoreState
in interfaceDeploymentsInProgressService
- Returns:
- keys of successfully restore results
-
detachDeploymentFromAgent
public void detachDeploymentFromAgent(long agentId)
Description copied from interface:DeploymentsInProgressService
Detach 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:
detachDeploymentFromAgent
in interfaceDeploymentsInProgressService
-
-