com.atlassian.bamboo.chains
Class ChainResultManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.chains.ChainResultManagerImpl
All Implemented Interfaces:
ChainResultManager

public class ChainResultManagerImpl
extends java.lang.Object
implements ChainResultManager


Constructor Summary
ChainResultManagerImpl(BuildResultsSummaryManager buildResultsSummaryManager, LimitedConcurrencyCaller limitedConcurrencyCaller, ErrorUpdateHandler errorUpdateHandler, com.opensymphony.xwork.TextProvider textProvider, PlanManager planManager, ArtifactLinkManager artifactLinkManager)
           
 
Method Summary
 ChainStateResult create(Chain chain, BuildContext chainBuildContext, java.util.Map<ChainStage,java.util.Map<Job,BuildContext>> jobBuildContexts, java.util.Collection<ChainStage> stagesToExecute)
          Creates a ChainState from Chain and BuildContext and reports any errors
 long getAverageProgressDurationForStages(Chain chain, java.util.Collection<ChainStageResult> stages, int numberOfResults)
          Calculates average duration of provided stages execution
 ChainStateResult updateForContinuedBuild(BuildContext chainBuildContext, java.util.Collection<BuildContext> jobBuildContexts, PlanExecutionConfig planExecutionConfig)
          Creates a ChainState for build already executed and stopped on manual stage of failed
 void updateStateToInProgress(PlanResultKey chainResultKey, java.util.Date startDate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainResultManagerImpl

public ChainResultManagerImpl(BuildResultsSummaryManager buildResultsSummaryManager,
                              LimitedConcurrencyCaller limitedConcurrencyCaller,
                              ErrorUpdateHandler errorUpdateHandler,
                              com.opensymphony.xwork.TextProvider textProvider,
                              PlanManager planManager,
                              ArtifactLinkManager artifactLinkManager)
Method Detail

updateStateToInProgress

public void updateStateToInProgress(@NotNull
                                    PlanResultKey chainResultKey,
                                    @NotNull
                                    java.util.Date startDate)
Specified by:
updateStateToInProgress in interface ChainResultManager

create

@NotNull
public ChainStateResult create(@NotNull
                                       Chain chain,
                                       @NotNull
                                       BuildContext chainBuildContext,
                                       @NotNull
                                       java.util.Map<ChainStage,java.util.Map<Job,BuildContext>> jobBuildContexts,
                                       @NotNull
                                       java.util.Collection<ChainStage> stagesToExecute)
Description copied from interface: ChainResultManager
Creates a ChainState from Chain and BuildContext and reports any errors

Specified by:
create in interface ChainResultManager
Returns:
chainResultState

updateForContinuedBuild

@NotNull
public ChainStateResult updateForContinuedBuild(@NotNull
                                                        BuildContext chainBuildContext,
                                                        @NotNull
                                                        java.util.Collection<BuildContext> jobBuildContexts,
                                                        @NotNull
                                                        PlanExecutionConfig planExecutionConfig)
Description copied from interface: ChainResultManager
Creates a ChainState for build already executed and stopped on manual stage of failed

Specified by:
updateForContinuedBuild in interface ChainResultManager
planExecutionConfig - - controls the continue/restart execution
Returns:

getAverageProgressDurationForStages

public long getAverageProgressDurationForStages(@NotNull
                                                Chain chain,
                                                @NotNull
                                                java.util.Collection<ChainStageResult> stages,
                                                int numberOfResults)
Description copied from interface: ChainResultManager
Calculates average duration of provided stages execution

Specified by:
getAverageProgressDurationForStages in interface ChainResultManager
stages - stages for current execution of plan included in calculation
numberOfResults - number of previous executions included in calculations
Returns:


Copyright © 2011 Atlassian. All Rights Reserved.