Interface CleanupProcessState

    • Method Detail

      • getCurrentStage

        @NotNull
        String getCurrentStage()
        Returns text description of the current cleanup stage.
        Returns:
        returns text description of current cleanup stage
      • isInterrupted

        boolean isInterrupted()
        Returns true if the cleanup process was interrupted.
        Note for extensions: the usage of throwIfInterrupted() is preferred because allows to stop the cleanup process faster.
        Returns:
        true if the cleanup process was interrupted
        See Also:
        throwIfInterrupted()
      • getInterruptReason

        @Nullable
        InterruptReason getInterruptReason()
        Returns:
        if cleanup interrupted, returns reason of interruption
      • getInterruptUser

        @Nullable
        SUser getInterruptUser()
        Returns:
        if cleanup interrupted, returns user who interrupted it
      • getProcessedBuilds

        int getProcessedBuilds()
        Returns:
        number of processed builds or -1 it there is none of them
      • getBuildsToProcess

        int getBuildsToProcess()
        Returns:
        number of builds scheduled to cleanup but not yet processed
      • getElapsedTime

        long getElapsedTime()
        Returns:
        returns cleanup process elapsed time in milliseconds
      • isInProgress

        boolean isInProgress()
        Returns:
        true if cleanup is in progress (even if it was interrupted)
      • getProcessedBuilds

        @NotNull
        Collection<Long> getProcessedBuilds​(@NotNull
                                            CleanupLevel... cleanupLevels)
        Returns ids of all builds processed on specified cleanup levels.
        Parameters:
        cleanupLevels - cleanup levels
        Returns:
        ids of processed builds
      • getRemovedProjectsIds

        @NotNull
        Set<String> getRemovedProjectsIds()
        Returns:
        a collection of internal project ids for the removed projects whose data should be cleaned up
        Since:
        2018.1
      • getRemovedBuildTypesIds

        @NotNull
        Set<String> getRemovedBuildTypesIds()
        Returns:
        a collection of internal build type ids of the removed build configurations
        Since:
        2018.1