Package com.atlassian.bamboo.chains
Interface ChainExecutionManager
- All Superinterfaces:
ChainExecutionAccessor
- All Known Implementing Classes:
ChainExecutionManagerImpl
Manages the execution of a
Chain-
Method Summary
Modifier and TypeMethodDescription@NotNull ChainStateCreationRequestResultcreateChainStateNoDetection(@NotNull ImmutableChain chain, @NotNull UnconditionalBuildDetectionAction buildDetectionAction) Create a chain state ready for building but dont actually build.@NotNull ChainExecutionRequestResultdelayedStart(@NotNull ImmutableChain chain, @NotNull UnconditionalBuildDetectionAction buildDetectionAction, @NotNull ChainState chainState) Starts the Chain if it's been created alreadydelayedStart(@NotNull ImmutableChain chain, @NotNull UnconditionalBuildDetectionAction buildDetectionAction, @NotNull ChainState chainState, PlanExecutionLaunchControl.ReleaseLocksActions releaseLocksActions) Starts the Chain if it's been created alreadyrestoreState(Set<PlanResultKey> chainResultsToRestore, Map<PlanResultKey, BuildResultsSummary> jobsInProgress, ExecutorService executorService) Restores the state of running chains after server restart on custom-provided executor service.@NotNull ChainExecutionRequestResultstart(@NotNull ImmutableChain chain, @NotNull ConditionalBuildDetectionAction buildDetectionAction) Starts the Chainvoidvoidstop(@NotNull PlanResultKey planResultKey) Stops the executing instance of theChainrepresented byPlanResultKeyMethods inherited from interface com.atlassian.bamboo.chains.ChainExecutionAccessor
getChainExecution, getExecutingChains, getFlatExecutingChains, getJobExecution, isActive, isExecuting, isExecuting, logChainExecutionState, numberOfChainsExecuting, numberOfChainsExecuting
-
Method Details
-
start
@NotNull @NotNull ChainExecutionRequestResult start(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull ConditionalBuildDetectionAction buildDetectionAction) Starts the Chain- Parameters:
chain-buildDetectionAction-- Returns:
- success or null if chain execution has not been started
-
delayedStart
@NotNull @NotNull ChainExecutionRequestResult delayedStart(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull UnconditionalBuildDetectionAction buildDetectionAction, @NotNull @NotNull ChainState chainState) Starts the Chain if it's been created already- Parameters:
chain-buildDetectionAction-chainState- if already created- Returns:
- success or null if chain execution has not been started
-
delayedStart
ChainExecutionRequestResult delayedStart(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull UnconditionalBuildDetectionAction buildDetectionAction, @NotNull @NotNull ChainState chainState, @NotNull PlanExecutionLaunchControl.ReleaseLocksActions releaseLocksActions) Starts the Chain if it's been created already- Parameters:
chain-buildDetectionAction-chainState- if already createdreleaseLocksActions- actions used for releasing repositories caches locks- Returns:
- success or null if chain execution has not been started since 9.3
-
createChainStateNoDetection
@NotNull @NotNull ChainStateCreationRequestResult createChainStateNoDetection(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull UnconditionalBuildDetectionAction buildDetectionAction) Create a chain state ready for building but dont actually build.- Parameters:
chain-buildDetectionAction-- Returns:
-
stop
Stops the executing instance of theChainrepresented byPlanResultKey- Parameters:
planResultKey-
-
stop
- Parameters:
planKey-
-
restoreState
Set<PlanResultKey> restoreState(Set<PlanResultKey> chainResultsToRestore, Map<PlanResultKey, BuildResultsSummary> jobsInProgress, ExecutorService executorService) throws ExecutionException, InterruptedExceptionRestores the state of running chains after server restart on custom-provided executor service.- Returns:
- keys of jobs that are running according to stored chain states.
- Throws:
ExecutionExceptionInterruptedException- Since:
- 9.4
-