Package com.atlassian.bamboo.v2.build
Interface CurrentlyBuilding
- All Superinterfaces:
BambooCustomDataAware
,ExecutionStatus
- All Known Implementing Classes:
CurrentlyBuildingImpl
This object encapsulates the
BuildContext
that'd being built and the BuildAgent
id it's related to-
Method Summary
Modifier and TypeMethodDescriptionboolean
Attempt to stop finishing the build in case of database issues.@Nullable AgentType
The current build agent type iff the build is current building on an agent.@Nullable Long
The current build agent id iff the build is current building on an agent.@Nullable BuildCancelledDetails
@Nullable BuildHungDetails
Details about the build if it hung.@Nullable BuildQueueTimeoutDetails
Details about the build if queue timeout was detected.Container for custom data@NotNull Date
TheDate
when the build was originally queued@Nullable Date
The timeDate
when updating / checking out source repository beganboolean
Is the build queued?boolean
Was it registered as building on agent, but agent requested another job since?boolean
void
setAgentType
(@Nullable AgentType agentType) Sets the agent typevoid
setBuildAgentId
(@Nullable Long agentId) Sets the fact that the build will now be building on an agentvoid
setBuildCancelledDetails
(@Nullable BuildCancelledDetails buildCancelledDetails) void
setBuildHangDetails
(@Nullable BuildHungDetails buildHungDetails) Set the details if the build was detected to be hung.void
setBuildQueueTimeoutDetails
(BuildQueueTimeoutDetails buildQueueTimeoutDetails) Sets build queue timeout detailsvoid
setStartTime
(long timestamp) Sets the start timestamp of the build.void
setStopTime
(long timestamp) Sets the stop timestamp of the build.void
setVcsUpdateTime
(@NotNull Date vcsUpdateTime) void
Deprecated.void
Deprecated.since 9.4 usesetStopTime(long)
boolean
Attempt to mark this object for operation requiring exclusive access: i.e.Methods inherited from interface com.atlassian.bamboo.core.BambooCustomDataAware
updateCustomDataEntry
Methods inherited from interface com.atlassian.bamboo.plan.ExecutionStatus
getAverageDuration, getBuildChanges, getBuildIdentifier, getElapsedTime, getProgressBar, getStartTime, getTriggerReason
-
Method Details
-
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
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
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() -
getQueueTime
TheDate
when the build was originally queued- Specified by:
getQueueTime
in interfaceExecutionStatus
- Returns:
-
getVcsUpdateTime
The timeDate
when updating / checking out source repository began- Returns:
-
getBuildHangDetails
Details about the build if it hung. Will be null if build was fine.- Returns:
-
getBuildCancelledDetails
-
getBuildQueueTimeoutDetails
Details about the build if queue timeout was detected.- Returns:
-
setBuildAgentId
Sets the fact that the build will now be building on an agent- Parameters:
agentId
- agent's id
-
setAgentType
Sets the agent type- Parameters:
agentType
- agent's type- Since:
- 9.3
-
setBuildCancelledDetails
-
setBuildHangDetails
Set the details if the build was detected to be hung.- Parameters:
buildHungDetails
-
-
setBuildQueueTimeoutDetails
Sets build queue timeout details- Parameters:
buildQueueTimeoutDetails
-
-
setVcsUpdateTime
-
startTimer
Deprecated.since 9.4 usesetStartTime(long)
Starts an internal timer to the currently running build -
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.since 9.4 usesetStopTime(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.
-
setStartTime(long)