Class DeploymentsInProgressServiceImpl
java.lang.Object
com.atlassian.bamboo.deployments.runtime.DeploymentsInProgressServiceImpl
- All Implemented Interfaces:
DeploymentsInProgressService
public class DeploymentsInProgressServiceImpl
extends Object
implements DeploymentsInProgressService
-
Constructor Summary
ConstructorDescriptionDeploymentsInProgressServiceImpl
(XStreamFactory xStreamFactory, FeatureManager featureManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
detachDeploymentFromAgent
(long agentId) Detach running deployment (if any) from an agent that was assigned to it.@Nullable DeploymentInProgress
getDeploymentExecutingOnAgent
(long agentId) getDeploymentExecutingOnEnvironment
(long environmentId) Retrieve optional deployment running on a given environment@Nullable DeploymentInProgress
getDeploymentInProgressById
(long deploymentResultId) @NotNull Iterable<DeploymentInProgress>
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) 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:
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
- 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
- Specified by:
getDeploymentExecutingOnAgent
in interfaceDeploymentsInProgressService
-
getDeploymentExecutingOnEnvironment
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
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
-