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 ImmutableJobcreateImmutableJobBasedOnDto(@NotNull ImmutableChain parent, @NotNull ImmutableChainStage stage, @NotNull EnrichedPlanDto jobDto, boolean isLightWeight) Create immutableImmutableJob.@NotNull ImmutableChainStagecreateImmutableStageBasedOnDto(@NotNull ImmutableChain parent, @NotNull FlatChainStageDto stageDto, @NotNull Map<Long, List<EnrichedPlanDto>> jobsGroupedByStageId, boolean isLightWeight) Create immutableChainStage.@NotNull ImmutableJobcreateLightweightImmutableJob(@NotNull ImmutableChain parent, @NotNull ImmutableChainStage stage, @NotNull ImmutableJob job) createLightweightImmutableStage(@NotNull ImmutableChain parent, @NotNull ImmutableChainStage stage) Create immutableChainStage.getChainResultDetails(PlanResultKey planResultKey) @Nullable ImmutableResultsSummarygetLatestResultForPlan(@NotNull ImmutableChain immutableChain) @Nullable ImmutableResultsSummarygetLatestResultForPlan(PlanKey planKey) @Nullable ImmutableChaingetPlanByKey(@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:
getPlanByKeyin interfaceImmutablePlanManager
-
getPlanVersions
Description copied from interface:ImmutablePlanManagerGets the plans' versions corresponding to the given ids.- Specified by:
getPlanVersionsin interfaceImmutablePlanManager- Parameters:
planIds- list of plan ids- Returns:
- map of plan id to plan version
-
getLatestResultForPlan
- Specified by:
getLatestResultForPlanin interfaceImmutablePlanManager
-
getLatestResultForPlan
@Nullable public @Nullable ImmutableResultsSummary getLatestResultForPlan(@NotNull @NotNull ImmutableChain immutableChain) - Specified by:
getLatestResultForPlanin interfaceImmutablePlanManager
-
getChainResultDetails
- Specified by:
getChainResultDetailsin interfaceImmutablePlanManager
-
createLightweightImmutableJob
@NotNull public @NotNull ImmutableJob createLightweightImmutableJob(@NotNull @NotNull ImmutableChain parent, @NotNull @NotNull ImmutableChainStage stage, @NotNull @NotNull ImmutableJob job) - Specified by:
createLightweightImmutableJobin interfaceImmutablePlanManager- Parameters:
parent- instance of ImmutablePlanImplstage- instance of ImmutableChainStageImpljob-- Returns:
-
createLightweightImmutableStage
public ImmutableChainStage createLightweightImmutableStage(@NotNull @NotNull ImmutableChain parent, @NotNull @NotNull ImmutableChainStage stage) Description copied from interface:ImmutablePlanManagerCreate immutableChainStage. Used to create immutable cached object from persisted entity.- Specified by:
createLightweightImmutableStagein interfaceImmutablePlanManager- Parameters:
parent-Chainobject (expecting an immutable object here as well)stage-ChainStageobject used as a source of all properties including jobs- Returns:
-
loadAllPlans
Description copied from interface:ImmutablePlanManagerGet all available plans. This method is a very heavy one and the execution may take a long time.- Specified by:
loadAllPlansin 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:ImmutablePlanManagerCreate immutableChainStage. Used to create immutable cached object from flat components - dto.- Specified by:
createImmutableStageBasedOnDtoin interfaceImmutablePlanManager- Parameters:
parent-Chainobject (expecting an immutable object here as well)stageDto-FlatChainStageDtoflat 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:ImmutablePlanManagerCreate immutableImmutableJob. Used to create immutable cached object from flat components - dto.- Specified by:
createImmutableJobBasedOnDtoin interfaceImmutablePlanManager- Parameters:
parent-Chainobject (expecting an immutable object here as well)stage-ChainStageobject (expecting an immutable object here as well)jobDto-EnrichedPlanDtoflat object used as a source of core attributesisLightWeight- informs whether it is a derived job from a lightweight branch or not- Returns:
-