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 ChainStateCreationRequestResult
createChainStateNoDetection(@NotNull ImmutableChain chain, @NotNull UnconditionalBuildDetectionAction buildDetectionAction)
Create a chain state ready for building but dont actually build.@NotNull ChainExecutionRequestResult
delayedStart(@NotNull ImmutableChain chain, @NotNull UnconditionalBuildDetectionAction buildDetectionAction, @NotNull ChainState chainState)
Starts the Chain if it's been created alreadyChainExecutionRequestResult
delayedStart(@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 ChainExecutionRequestResult
start(@NotNull ImmutableChain chain, @NotNull ConditionalBuildDetectionAction buildDetectionAction)
Starts the Chainvoid
stop(@NotNull PlanKey planKey)
void
stop(@NotNull PlanResultKey planResultKey)
Stops the executing instance of theChain
represented 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 theChain
represented 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:
ExecutionException
InterruptedException
- Since:
- 9.4
-
-