Package com.atlassian.bamboo.plan.cache
Interface ImmutablePlanManager
-
- All Known Implementing Classes:
ImmutablePlanManagerImpl
@ExperimentalApi @Internal public interface ImmutablePlanManager
Transactional manager for immutable plans. Only works forChain
. You shouldn't use this. Really.- Since:
- v3.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @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 job, @NotNull Map<Long,EnrichedPlanDto> jobsGroupedById, boolean isLightWeight)
Create immutableImmutableJob
.ImmutableChainStage
createImmutableStage(@NotNull ImmutableChain parent, @NotNull ChainStage stage)
Create immutableChainStage
.@NotNull ImmutableChainStage
createImmutableStageBasedOnDto(@NotNull ImmutableChain parent, @NotNull FlatChainStageDto stage, @NotNull Map<Long,List<EnrichedPlanDto>> jobsGroupedByStageId, @NotNull Map<Long,EnrichedPlanDto> jobsGroupedById, boolean isLightWeight)
Create immutableChainStage
.@Nullable ChainResultDetails
getChainResultDetails(PlanResultKey planResultKey)
@Nullable ImmutableResultsSummary
getLatestResultForPlan(@NotNull ImmutableChain immutableChain)
@Nullable ImmutableResultsSummary
getLatestResultForPlan(PlanKey planKey)
@Nullable ImmutableChain
getPlanByKey(@NotNull PlanKey planKey)
@NotNull Map<Long,Long>
getPlanVersions(@NotNull Set<Long> planIds)
Gets the plans' versions corresponding to the given ids.@NotNull List<ImmutableChain>
loadAllPlans(ForkJoinPool executorService)
Get all available plans.
-
-
-
Method Detail
-
getPlanByKey
@Nullable @Nullable ImmutableChain getPlanByKey(@NotNull @NotNull PlanKey planKey)
-
getPlanVersions
@NotNull @NotNull Map<Long,Long> getPlanVersions(@NotNull @NotNull Set<Long> planIds)
Gets the plans' versions corresponding to the given ids.- Parameters:
planIds
- list of plan ids- Returns:
- map of plan id to plan version
- Since:
- 9.4
-
getLatestResultForPlan
@Nullable @Nullable ImmutableResultsSummary getLatestResultForPlan(PlanKey planKey)
-
getLatestResultForPlan
@Nullable @Nullable ImmutableResultsSummary getLatestResultForPlan(@NotNull @NotNull ImmutableChain immutableChain)
- Since:
- 9.3
-
getChainResultDetails
@Nullable @Nullable ChainResultDetails getChainResultDetails(PlanResultKey planResultKey)
-
createImmutableChain
@NotNull @NotNull ImmutableChain createImmutableChain(@NotNull @NotNull Chain chain)
-
createImmutableJob
@NotNull @NotNull ImmutableJob createImmutableJob(@NotNull @NotNull ImmutableChain parent, @NotNull @NotNull ImmutableChainStage stage, @NotNull @NotNull Job job)
- Parameters:
parent
- instance of ImmutablePlanImplstage
- instance of ImmutableChainStageImpljob
-- Returns:
-
createImmutableStage
ImmutableChainStage createImmutableStage(@NotNull @NotNull ImmutableChain parent, @NotNull @NotNull ChainStage stage)
Create immutableChainStage
. Used to create immutable cached object from persisted entity.- 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
@NotNull @NotNull List<ImmutableChain> loadAllPlans(ForkJoinPool executorService)
Get all available plans. This method is a very heavy one and the execution may take a long time.
-
createImmutableStageBasedOnDto
@NotNull @NotNull ImmutableChainStage createImmutableStageBasedOnDto(@NotNull @NotNull ImmutableChain parent, @NotNull @NotNull FlatChainStageDto stage, @NotNull @NotNull Map<Long,List<EnrichedPlanDto>> jobsGroupedByStageId, @NotNull @NotNull Map<Long,EnrichedPlanDto> jobsGroupedById, boolean isLightWeight)
Create immutableChainStage
. Used to create immutable cached object from flat components - dto.- Parameters:
parent
-Chain
object (expecting an immutable object here as well)stage
-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 @NotNull ImmutableJob createImmutableJobBasedOnDto(@NotNull @NotNull ImmutableChain parent, @NotNull @NotNull ImmutableChainStage stage, @NotNull @NotNull EnrichedPlanDto job, @NotNull @NotNull Map<Long,EnrichedPlanDto> jobsGroupedById, boolean isLightWeight)
Create immutableImmutableJob
. Used to create immutable cached object from flat components - dto.- Parameters:
parent
-Chain
object (expecting an immutable object here as well)stage
-ChainStage
object (expecting an immutable object here as well)job
-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:
-
-