Package com.atlassian.bamboo.chains
Interface ChainExecutionManager
-
- All Superinterfaces:
ChainExecutionAccessor
- All Known Implementing Classes:
ChainExecutionManagerImpl
@Internal public interface ChainExecutionManager extends ChainExecutionAccessor
Manages the execution of aChain
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @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 alreadyChainExecutionRequestResultdelayedStart(@NotNull ImmutableChain chain, @NotNull UnconditionalBuildDetectionAction buildDetectionAction, @NotNull ChainState chainState, PlanExecutionLaunchControl.ReleaseLocksActions releaseLocksActions)Starts the Chain if it's been created alreadySet<PlanResultKey>restoreState(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 Chainvoidstop(@NotNull PlanKey planKey)voidstop(@NotNull PlanResultKey planResultKey)Stops the executing instance of theChainrepresented byPlanResultKey-
Methods inherited from interface com.atlassian.bamboo.chains.ChainExecutionAccessor
getChainExecution, getExecutingChains, getJobExecution, isActive, isExecuting, isExecuting, logChainExecutionState, numberOfChainsExecuting, numberOfChainsExecuting
-
-
-
-
Method Detail
-
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
void stop(@NotNull @NotNull PlanResultKey planResultKey)Stops the executing instance of theChainrepresented byPlanResultKey- Parameters:
planResultKey-
-
stop
void stop(@NotNull @NotNull PlanKey planKey)- Parameters:
planKey-
-
restoreState
Set<PlanResultKey> restoreState(Set<PlanResultKey> chainResultsToRestore, Map<PlanResultKey,BuildResultsSummary> jobsInProgress, ExecutorService executorService) throws ExecutionException, InterruptedException
Restores 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
-
-