Interface ImmutablePlanManager

  • All Known Implementing Classes:
    ImmutablePlanManagerImpl

    @ExperimentalApi
    @Internal
    public interface ImmutablePlanManager
    Transactional manager for immutable plans. Only works for Chain. You shouldn't use this. Really.
    Since:
    v3.4
    • Method Detail

      • 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
      • 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 ImmutablePlanImpl
        stage - instance of ImmutableChainStageImpl
        job -
        Returns:
      • createImmutableStage

        ImmutableChainStage createImmutableStage​(@NotNull
                                                 @NotNull ImmutableChain parent,
                                                 @NotNull
                                                 @NotNull ChainStage stage)
        Create immutable ChainStage. 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 immutable ChainStage. 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 attributes
        jobsGroupedByStageId - Map of flat job objects grouped by stage id
        jobsGroupedById - Map of flat job objects grouped by their main id
        isLightWeight - 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 immutable ImmutableJob. 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 attributes
        jobsGroupedById - Map of flat job objects grouped by their main id
        isLightWeight - informs whether it is a derived job from a lightweight branch or not
        Returns: