Interface BuildNumberGeneratorService

  • All Known Implementing Classes:
    BuildNumberGeneratorServiceImpl

    public interface BuildNumberGeneratorService
    Service that generates unique build numbers for build plans.
    Author:
    anatoli
    • Method Detail

      • generateBuildNumber

        int generateBuildNumber​(@NotNull
                                @NotNull PlanIdentifier planIdentifier)
        Returns a unique(consecutive) build number for a plan with the given key.
        Parameters:
        planIdentifier -
        Returns:
      • initBuildNumbers

        @Internal
        void initBuildNumbers​(@NotNull
                              @NotNull PlanIdentifier planIdentifier)
        Initialise build numbers for a plan.
      • setBuildNumber

        boolean setBuildNumber​(@NotNull
                               @NotNull PlanIdentifier planIdentifier,
                               int newBuildNumber)
        Sets new build number for a plan with the given key. newBuildNumber must be greater than the current one.
        Parameters:
        planIdentifier - Identifier of a plan
        newBuildNumber - must be greater than actual build number
        Returns:
        true if newBuildNumber is greater than the old one. Otherwise false.
      • getNextBuildNumber

        int getNextBuildNumber​(@NotNull
                               @NotNull PlanIdentifier planIdentifier)
        Returns next build number for a plan with the given key without bumping it.
        Parameters:
        planIdentifier -
        Returns: