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
ConstructorDescriptionImmutablePlanManagerImpl
(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 ImmutableChain
createImmutableChain
(@NotNull Chain chain) @NotNull ImmutableJob
createImmutableJob
(@NotNull ImmutableChain parent, @NotNull ImmutableChainStage stage, @NotNull Job job) @NotNull ImmutableJob
createImmutableJobBasedOnDto
(@NotNull ImmutableChain parent, @NotNull ImmutableChainStage stage, @NotNull EnrichedPlanDto jobDto, @NotNull Map<Long, EnrichedPlanDto> jobsGroupedById, boolean isLightWeight) Create immutableImmutableJob
.createImmutableStage
(@NotNull ImmutableChain parent, @NotNull ChainStage stage) Create immutableChainStage
.@NotNull ImmutableChainStage
createImmutableStageBasedOnDto
(@NotNull ImmutableChain parent, @NotNull FlatChainStageDto stageDto, @NotNull Map<Long, List<EnrichedPlanDto>> jobsGroupedByStageId, @NotNull Map<Long, EnrichedPlanDto> jobsGroupedById, boolean isLightWeight) 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
-
createImmutableChain
- Specified by:
createImmutableChain
in interfaceImmutablePlanManager
-
createImmutableJob
@NotNull public @NotNull ImmutableJob createImmutableJob(@NotNull @NotNull ImmutableChain parent, @NotNull @NotNull ImmutableChainStage stage, @NotNull @NotNull Job job) - Specified by:
createImmutableJob
in interfaceImmutablePlanManager
- Parameters:
parent
- instance of ImmutablePlanImplstage
- instance of ImmutableChainStageImpl- Returns:
-
createImmutableStage
public ImmutableChainStage createImmutableStage(@NotNull @NotNull ImmutableChain parent, @NotNull @NotNull ChainStage stage) Description copied from interface:ImmutablePlanManager
Create immutableChainStage
. Used to create immutable cached object from persisted entity.- Specified by:
createImmutableStage
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, @NotNull @NotNull Map<Long, EnrichedPlanDto> jobsGroupedById, 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 idjobsGroupedById
- Map of flat job objects grouped by their main 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, @NotNull @NotNull Map<Long, EnrichedPlanDto> jobsGroupedById, 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 attributesjobsGroupedById
- Map of flat job objects grouped by their main idisLightWeight
- informs whether it is a derived job from a lightweight branch or not- Returns:
-