Interface CurrentlyBuilding

    • Method Detail

      • getBuildAgentId

        @Nullable
        @Nullable Long getBuildAgentId()
        The current build agent id iff the build is current building on an agent. This will be null if the build has not been picked up by an agent or the agent handed off the build to the server
        Returns:
        agent's id
      • getAgentType

        @Nullable
        @Nullable AgentType getAgentType()
        The current build agent type iff the build is current building on an agent. This will be null if the build has not been picked up by an agent or the agent handed off the build to the server
        Returns:
        agent's type
        Since:
        9.3
      • getCustomData

        @NotNull
        default @NotNull Map<String,​String> getCustomData()
        Container for custom data
        Returns:
        map of key-value pairs
        Since:
        9.3
      • isCurrentlyQueuedOnly

        boolean isCurrentlyQueuedOnly()
        Is the build queued?
        Returns:
      • isDetachedFromAgent

        boolean isDetachedFromAgent()
        Was it registered as building on agent, but agent requested another job since?
      • isUpdatingVcs

        boolean isUpdatingVcs()
      • getVcsUpdateTime

        @Nullable
        @Nullable Date getVcsUpdateTime()
        The time Date when updating / checking out source repository began
        Returns:
      • getBuildHangDetails

        @Nullable
        @Nullable BuildHungDetails getBuildHangDetails()
        Details about the build if it hung. Will be null if build was fine.
        Returns:
      • getBuildQueueTimeoutDetails

        @Nullable
        @Nullable BuildQueueTimeoutDetails getBuildQueueTimeoutDetails()
        Details about the build if queue timeout was detected.
        Returns:
      • setBuildAgentId

        void setBuildAgentId​(@Nullable
                             @Nullable Long agentId)
        Sets the fact that the build will now be building on an agent
        Parameters:
        agentId - agent's id
      • setAgentType

        void setAgentType​(@Nullable
                          @Nullable AgentType agentType)
        Sets the agent type
        Parameters:
        agentType - agent's type
        Since:
        9.3
      • setBuildCancelledDetails

        void setBuildCancelledDetails​(@Nullable
                                      @Nullable BuildCancelledDetails buildCancelledDetails)
      • setBuildHangDetails

        void setBuildHangDetails​(@Nullable
                                 @Nullable BuildHungDetails buildHungDetails)
        Set the details if the build was detected to be hung.
        Parameters:
        buildHungDetails -
      • setBuildQueueTimeoutDetails

        void setBuildQueueTimeoutDetails​(BuildQueueTimeoutDetails buildQueueTimeoutDetails)
        Sets build queue timeout details
        Parameters:
        buildQueueTimeoutDetails -
      • setVcsUpdateTime

        void setVcsUpdateTime​(@NotNull
                              @NotNull Date vcsUpdateTime)
      • setStartTime

        void setStartTime​(long timestamp)
        Sets the start timestamp of the build. If there was the time already defined, it will not be overwritten and the passed value will be discarded.
        Since:
        9.4
      • stopTimer

        @Deprecated
        void stopTimer()
        Deprecated.
        since 9.4 use setStopTime(long)
        Stops the internal timer for the current running build
      • setStopTime

        void setStopTime​(long timestamp)
        Sets the stop timestamp of the build. If there was the time already defined, it will not be overwritten and the passed value will be discarded.
        Since:
        9.4
      • tryToFinish

        boolean tryToFinish()
        Attempt to mark this object for operation requiring exclusive access: i.e. finishing build. Return value indicates if current thread is the first to call this method.
        Returns:
        true iff thread is free to request removal of this object
      • abortFinishing

        boolean abortFinishing()
        Attempt to stop finishing the build in case of database issues.
        Returns:
        true if there was an attempt to finish the build.