Package com.atlassian.bamboo.plan.cache
Class ImmutablePlanManagerImpl
java.lang.Object
com.atlassian.bamboo.plan.cache.ImmutablePlanManagerImpl
- All Implemented Interfaces:
ImmutablePlanManager
- Since:
- v3.4
-
Constructor Summary
ConstructorsConstructorDescriptionImmutablePlanManagerImpl
(PlanManager planManager, PlanDtoManager planDtoManager, InternalResultsSummaryAccessor immutableResultsSummaryAccessor, BuildDefinitionManager buildDefinitionManager, BuildLoggerManager buildLoggerManager, LabelDao labelDao, RepositoryDefinitionManager repositoryDefinitionManager, TaskManager taskManager, TriggerManager triggerManager, VariableDefinitionManager variableDefinitionManager, BambooSpecsSourceDao bambooSpecsSourceDao, NotificationManager notificationManager, RequirementManager requirementManager, VersionDao versionDao) -
Method Summary
Modifier and TypeMethodDescription@NotNull ImmutableJob
createImmutableJobBasedOnDto
(@NotNull ImmutableChain parent, @NotNull ImmutableChainStage stage, @NotNull EnrichedPlanDto jobDto, boolean isLightWeight) Create immutableImmutableJob
.@NotNull ImmutableChainStage
createImmutableStageBasedOnDto
(@NotNull ImmutableChain parent, @NotNull FlatChainStageDto stageDto, @NotNull Map<Long, List<EnrichedPlanDto>> jobsGroupedByStageId, boolean isLightWeight) Create immutableChainStage
.@NotNull ImmutableJob
createLightweightImmutableJob
(@NotNull ImmutableChain parent, @NotNull ImmutableChainStage stage, @NotNull ImmutableJob job) createLightweightImmutableStage
(@NotNull ImmutableChain parent, @NotNull ImmutableChainStage stage) Create immutableChainStage
.getChainResultDetails
(PlanResultKey planResultKey) @Nullable ImmutableResultsSummary
getLatestResultForPlan
(@NotNull ImmutableChain immutableChain) @Nullable ImmutableResultsSummary
getLatestResultForPlan
(PlanKey planKey) @Nullable ImmutableChain
getPlanByKey
(@NotNull PlanKey planKey) getPlanVersions
(@NotNull Set<Long> planIds) Gets the plans' versions corresponding to the given ids.@NotNull List<ImmutableChain>
loadAllPlans
(ForkJoinPool executorService) Get all available plans.
-
Constructor Details
-
ImmutablePlanManagerImpl
public ImmutablePlanManagerImpl(PlanManager planManager, PlanDtoManager planDtoManager, InternalResultsSummaryAccessor immutableResultsSummaryAccessor, BuildDefinitionManager buildDefinitionManager, BuildLoggerManager buildLoggerManager, LabelDao labelDao, RepositoryDefinitionManager repositoryDefinitionManager, TaskManager taskManager, TriggerManager triggerManager, VariableDefinitionManager variableDefinitionManager, BambooSpecsSourceDao bambooSpecsSourceDao, NotificationManager notificationManager, RequirementManager requirementManager, VersionDao versionDao)
-
-
Method Details
-
getPlanByKey
- Specified by:
getPlanByKey
in interfaceImmutablePlanManager
-
getPlanVersions
Description copied from interface:ImmutablePlanManager
Gets the plans' versions corresponding to the given ids.- Specified by:
getPlanVersions
in interfaceImmutablePlanManager
- Parameters:
planIds
- list of plan ids- Returns:
- map of plan id to plan version
-
getLatestResultForPlan
- Specified by:
getLatestResultForPlan
in interfaceImmutablePlanManager
-
getLatestResultForPlan
@Nullable public @Nullable ImmutableResultsSummary getLatestResultForPlan(@NotNull @NotNull ImmutableChain immutableChain) - Specified by:
getLatestResultForPlan
in interfaceImmutablePlanManager
-
getChainResultDetails
- Specified by:
getChainResultDetails
in interfaceImmutablePlanManager
-
createLightweightImmutableJob
@NotNull public @NotNull ImmutableJob createLightweightImmutableJob(@NotNull @NotNull ImmutableChain parent, @NotNull @NotNull ImmutableChainStage stage, @NotNull @NotNull ImmutableJob job) - Specified by:
createLightweightImmutableJob
in interfaceImmutablePlanManager
- Parameters:
parent
- instance of ImmutablePlanImplstage
- instance of ImmutableChainStageImpl- Returns:
-
createLightweightImmutableStage
public ImmutableChainStage createLightweightImmutableStage(@NotNull @NotNull ImmutableChain parent, @NotNull @NotNull ImmutableChainStage stage) Description copied from interface:ImmutablePlanManager
Create immutableChainStage
. Used to create immutable cached object from persisted entity.- Specified by:
createLightweightImmutableStage
in interfaceImmutablePlanManager
- Parameters:
parent
-Chain
object (expecting an immutable object here as well)stage
-ChainStage
object used as a source of all properties including jobs- Returns:
-
loadAllPlans
Description copied from interface:ImmutablePlanManager
Get all available plans. This method is a very heavy one and the execution may take a long time.- Specified by:
loadAllPlans
in interfaceImmutablePlanManager
-
createImmutableStageBasedOnDto
@NotNull public @NotNull ImmutableChainStage createImmutableStageBasedOnDto(@NotNull @NotNull ImmutableChain parent, @NotNull @NotNull FlatChainStageDto stageDto, @NotNull @NotNull Map<Long, List<EnrichedPlanDto>> jobsGroupedByStageId, boolean isLightWeight) Description copied from interface:ImmutablePlanManager
Create immutableChainStage
. Used to create immutable cached object from flat components - dto.- Specified by:
createImmutableStageBasedOnDto
in interfaceImmutablePlanManager
- Parameters:
parent
-Chain
object (expecting an immutable object here as well)stageDto
-FlatChainStageDto
flat object used as a source of core attributesjobsGroupedByStageId
- Map of flat job objects grouped by stage idisLightWeight
- informs whether it is a derived stage from a lightweight branch or not- Returns:
-
createImmutableJobBasedOnDto
@NotNull public @NotNull ImmutableJob createImmutableJobBasedOnDto(@NotNull @NotNull ImmutableChain parent, @NotNull @NotNull ImmutableChainStage stage, @NotNull @NotNull EnrichedPlanDto jobDto, boolean isLightWeight) Description copied from interface:ImmutablePlanManager
Create immutableImmutableJob
. Used to create immutable cached object from flat components - dto.- Specified by:
createImmutableJobBasedOnDto
in interfaceImmutablePlanManager
- Parameters:
parent
-Chain
object (expecting an immutable object here as well)stage
-ChainStage
object (expecting an immutable object here as well)jobDto
-EnrichedPlanDto
flat object used as a source of core attributesisLightWeight
- informs whether it is a derived job from a lightweight branch or not- Returns:
-