Interface KeepRule

  • All Superinterfaces:
    DbFieldsProvider
    All Known Subinterfaces:
    SKeepRule
    All Known Implementing Classes:
    KeepRuleImpl

    public interface KeepRule
    extends DbFieldsProvider
    Defines builds keep rule. Provides: 1) for history builds - data parts to keep; 2) for all (history and statistical) builds - build ids to keep statistics. Build data that should be kept by any rule will not be cleaned during cleanup.
    Since:
    2019.1
    • Method Detail

      • computeHistoryBuildsDataToKeep

        @NotNull
        Map<Long,​Collection<KeepBuildDataPart>> computeHistoryBuildsDataToKeep​(@NotNull
                                                                                     String buildTypeId,
                                                                                     @NotNull
                                                                                     DbBuildsData historyBuildsData)
        Computes data to keep for every incoming history build. If no data of some build should be kept, its id should be either absent in the result either data parts collection should be empty. There is no sense to return such KeepBuildDataPart that do not keep history.
        All historyBuildsData must belong to the same build configuration with id buildTypeId.
        Returns:
        map from build id to collection of build data parts to keep
      • computeBuildIdsToKeepStatistics

        @NotNull
        Collection<Long> computeBuildIdsToKeepStatistics​(@NotNull
                                                         String buildTypeId,
                                                         @NotNull
                                                         DbBuildsData buildsData)
        Returns such ids of the provided builds, statistical data of which should be kept.
        All buildsData must belong to the same build configuration with id buildTypeId.
        Returns:
        build ids to keep