Interface RunningBuildsManager

  • All Known Subinterfaces:
    BuildsManager, SBuildServer

    public interface RunningBuildsManager
    Provides various information about currently running builds.
    • Method Detail

      • findRunningBuildById

        @Nullable
        SRunningBuild findRunningBuildById​(long buildId)
        Searches for a running build by specified build id.
        Parameters:
        buildId - id of the build
        Returns:
        running build with specified build id or null if there are no running build with such build id.
      • getRunningBuildOnAgent

        @Nullable
        SRunningBuild getRunningBuildOnAgent​(SBuildAgent agent)
        Returns running build running on the specified agent or null if there are no build on the agent.
        Parameters:
        agent - agent to search build
        Returns:
        running build or null
      • getRunningBuilds

        @NotNull
        java.util.List<SRunningBuild> getRunningBuilds​(@Nullable
                                                       User user,
                                                       @Nullable
                                                       BuildDataFilter filter)
        Returns all running builds including personal builds. If user is not null then all non personal builds and personal builds of this user will be returned. If filter is not null it will be applied to the result. List of running builds is sorted by build id in reverse order (most recent build first).
        Parameters:
        user - owner of personal builds, can be null
        filter - filter to apply for builds, can be null
        Returns:
        unmodifiable list of running builds
      • getRunningBuilds

        @NotNull
        java.util.List<SRunningBuild> getRunningBuilds()
        Same as getRunningBuilds(null, null) List of running builds is sorted by build id in reverse order (most recent build first).
        Returns:
        see above
      • getNumberOfRunningBuilds

        int getNumberOfRunningBuilds()
        Returns total number of currently running builds.
        Returns:
        number of currently running builds.
      • getRunningStatus

        java.util.Map<SBuildType,​java.util.List<SRunningBuild>> getRunningStatus​(@Nullable
                                                                                       User user,
                                                                                       @Nullable
                                                                                       BuildDataFilter filter)
        Returns map of running builds per build configuration. Method returns all personal builds if user is null, otherwise only personal builds of this user are returned. If filter is not null it will be applied to the result. The resulting map will contain only those build configurations for which list or running builds is not empty. List of running builds is sorted by build id in reverse order (most recent build first).
        Parameters:
        user - owner of personal builds, can be null
        filter - filter to apply for builds, can be null
        Returns:
        unmodifiable map of running builds per build type