com.atlassian.bamboo.chains
Interface ChainExecutionManager

All Known Implementing Classes:
ChainExecutionManagerImpl

public interface ChainExecutionManager

Manages the execution of a Chain


Method Summary
 ChainStateCreationRequestResult createChainStateNoDetection(ImmutableChain chain, UnconditionalBuildDetectionAction buildDetectionAction)
          Create a chain state ready for building but dont actually build.
 ChainExecutionRequestResult delayedStart(ImmutableChain chain, UnconditionalBuildDetectionAction buildDetectionAction, ChainState chainState)
          Starts the Chain if it's been created already
 ChainExecution getChainExecution(PlanResultKey planResultKey)
          Get the state of the single ChainExecution
 java.util.List<ChainExecution> getExecutingChains(PlanKey planKey)
          Get the Collection of the state of the ChainExecution or empty collection when no chain is executing
 BuildExecution getJobExecution(PlanResultKey planResultKey)
          Get the state of a single Job being executed
 boolean isActive(PlanKey planKey)
          Checks if the Chain is "active" ie being queued, or building
 boolean isExecuting(PlanKey planKey)
          Checks if the Chain is building
 boolean isExecuting(PlanResultKey planResultKey)
          Checks of BuildResultsSummary represented by PlanResultKey is currently building (ie started on an agent_
 int numberOfChainsExecuting()
           
 int numberOfChainsExecuting(PlanKey planKey)
          Determines the number of ChainExecutions are active for the given PlanKey
 ChainExecutionRequestResult start(ImmutableChain chain, ConditionalBuildDetectionAction buildDetectionAction)
          Starts the Chain
 void stop(PlanKey planKey)
          Stops all executing instances of the Chain represented by PlanKey
 void stop(PlanResultKey planResultKey)
          Stops the executing instance of the Chain represented by PlanResultKey
 

Method Detail

start

@NotNull
ChainExecutionRequestResult start(@NotNull
                                          ImmutableChain chain,
                                          @NotNull
                                          ConditionalBuildDetectionAction buildDetectionAction)
Starts the Chain

Parameters:
chain -
buildDetectionAction -
Returns:
success or null if chain execution has not been started

delayedStart

@NotNull
ChainExecutionRequestResult delayedStart(@NotNull
                                                 ImmutableChain chain,
                                                 @NotNull
                                                 UnconditionalBuildDetectionAction buildDetectionAction,
                                                 @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

createChainStateNoDetection

@NotNull
ChainStateCreationRequestResult createChainStateNoDetection(@NotNull
                                                                    ImmutableChain chain,
                                                                    @NotNull
                                                                    UnconditionalBuildDetectionAction buildDetectionAction)
Create a chain state ready for building but dont actually build.

Parameters:
chain -
buildDetectionAction -
Returns:

stop

void stop(@NotNull
          PlanResultKey planResultKey)
Stops the executing instance of the Chain represented by PlanResultKey

Parameters:
planResultKey -

stop

void stop(@NotNull
          PlanKey planKey)
Stops all executing instances of the Chain represented by PlanKey

Parameters:
planKey -

isActive

boolean isActive(@NotNull
                 PlanKey planKey)
Checks if the Chain is "active" ie being queued, or building

Parameters:
planKey -
Returns:
active

isExecuting

boolean isExecuting(@NotNull
                    PlanKey planKey)
Checks if the Chain is building

Parameters:
planKey -
Returns:
running

isExecuting

boolean isExecuting(@NotNull
                    PlanResultKey planResultKey)
Checks of BuildResultsSummary represented by PlanResultKey is currently building (ie started on an agent_

Parameters:
planResultKey -
Returns:
executing

getExecutingChains

@NotNull
java.util.List<ChainExecution> getExecutingChains(@NotNull
                                                          PlanKey planKey)
Get the Collection of the state of the ChainExecution or empty collection when no chain is executing

Parameters:
planKey -
Returns:
chainExecution

getChainExecution

@Nullable
ChainExecution getChainExecution(@NotNull
                                          PlanResultKey planResultKey)
Get the state of the single ChainExecution

Parameters:
planResultKey -
Returns:

getJobExecution

@Nullable
BuildExecution getJobExecution(@NotNull
                                        PlanResultKey planResultKey)
Get the state of a single Job being executed

Parameters:
planResultKey -
Returns:

numberOfChainsExecuting

int numberOfChainsExecuting(@NotNull
                            PlanKey planKey)
Determines the number of ChainExecutions are active for the given PlanKey

Parameters:
planKey -
Returns:

numberOfChainsExecuting

int numberOfChainsExecuting()


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.