@ThreadSafe public class CurrentlyBuildingImpl extends Object implements CurrentlyBuilding
Constructor and Description |
---|
CurrentlyBuildingImpl(BuildIdentifier buildIdentifier,
BuildChanges buildChanges,
TriggerReason triggerReason,
Long averageDuration) |
Modifier and Type | Method and Description |
---|---|
boolean |
abortFinishing()
Attempt to stop finishing the build in case of database issues.
|
boolean |
equals(Object o) |
long |
getAverageDuration()
Estimated total execution time of a task.
|
@Nullable Long |
getBuildAgentId()
The current build agent id iff the build is current building on an agent.
|
@Nullable BuildCancelledDetails |
getBuildCancelledDetails() |
@NotNull BuildChanges |
getBuildChanges()
Changes associated with current build
|
@Nullable BuildHungDetails |
getBuildHangDetails()
Details about the build if it hung.
|
@NotNull BuildIdentifier |
getBuildIdentifier()
The ID of the build
|
BuildQueueTimeoutDetails |
getBuildQueueTimeoutDetails()
Details about the build if queue timeout was detected.
|
long |
getElapsedTime()
How long the task has taken up to now.
|
@NotNull PlanResultKey |
getPlanResultKey() |
@NotNull BuildProgressBar |
getProgressBar()
Because of XStream deserialization we need to lazy initialize buildProgressBar in getter
|
@NotNull Date |
getQueueTime()
The
Date when the build was originally queued |
@Nullable Date |
getStartTime()
When was the execution started.
|
@NotNull TriggerReason |
getTriggerReason()
The trigger reason of the current build
|
@Nullable Date |
getVcsUpdateTime()
The time
Date when updating / checking out source repository began |
int |
hashCode() |
boolean |
isCurrentlyQueuedOnly()
Is the build queued?
|
boolean |
isDetachedFromAgent()
Was it registered as building on agent, but agent requested another job since?
|
boolean |
isUpdatingVcs() |
void |
setBuildAgentId(@Nullable Long buildAgentId)
Sets the fact that the build will now be building on an agent
|
void |
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 details
|
void |
setVcsUpdateTime(@NotNull Date vcsUpdateTime) |
void |
startTimer()
Starts an internal timer to the currently running build
|
void |
stopTimer()
Stops the internal timer for the current running build
|
boolean |
tryToFinish()
Attempt to mark this object for operation requiring exclusive access: i.e.
|
public CurrentlyBuildingImpl(BuildIdentifier buildIdentifier, BuildChanges buildChanges, TriggerReason triggerReason, Long averageDuration)
@NotNull public @NotNull PlanResultKey getPlanResultKey()
@NotNull public @NotNull BuildIdentifier getBuildIdentifier()
ExecutionStatus
getBuildIdentifier
in interface ExecutionStatus
@NotNull public @NotNull BuildChanges getBuildChanges()
ExecutionStatus
getBuildChanges
in interface ExecutionStatus
@NotNull public @NotNull TriggerReason getTriggerReason()
ExecutionStatus
getTriggerReason
in interface ExecutionStatus
@NotNull public @NotNull BuildProgressBar getProgressBar()
getProgressBar
in interface ExecutionStatus
public long getAverageDuration()
ExecutionStatus
getAverageDuration
in interface ExecutionStatus
public boolean tryToFinish()
CurrentlyBuilding
tryToFinish
in interface CurrentlyBuilding
public boolean abortFinishing()
CurrentlyBuilding
abortFinishing
in interface CurrentlyBuilding
@Nullable public @Nullable Long getBuildAgentId()
CurrentlyBuilding
getBuildAgentId
in interface CurrentlyBuilding
public void setBuildAgentId(@Nullable @Nullable Long buildAgentId)
CurrentlyBuilding
setBuildAgentId
in interface CurrentlyBuilding
public boolean isCurrentlyQueuedOnly()
CurrentlyBuilding
isCurrentlyQueuedOnly
in interface CurrentlyBuilding
public boolean isDetachedFromAgent()
CurrentlyBuilding
isDetachedFromAgent
in interface CurrentlyBuilding
@Nullable public @Nullable Date getStartTime()
ExecutionStatus
getStartTime
in interface ExecutionStatus
@NotNull public @NotNull Date getQueueTime()
CurrentlyBuilding
Date
when the build was originally queuedgetQueueTime
in interface ExecutionStatus
getQueueTime
in interface CurrentlyBuilding
@Nullable public @Nullable Date getVcsUpdateTime()
CurrentlyBuilding
Date
when updating / checking out source repository begangetVcsUpdateTime
in interface CurrentlyBuilding
public void setVcsUpdateTime(@NotNull @NotNull Date vcsUpdateTime)
setVcsUpdateTime
in interface CurrentlyBuilding
public long getElapsedTime()
ExecutionStatus
getElapsedTime
in interface ExecutionStatus
public boolean isUpdatingVcs()
isUpdatingVcs
in interface CurrentlyBuilding
public void startTimer()
CurrentlyBuilding
startTimer
in interface CurrentlyBuilding
public void stopTimer()
CurrentlyBuilding
stopTimer
in interface CurrentlyBuilding
@Nullable public @Nullable BuildHungDetails getBuildHangDetails()
CurrentlyBuilding
getBuildHangDetails
in interface CurrentlyBuilding
public void setBuildHangDetails(@Nullable @Nullable BuildHungDetails buildHungDetails)
CurrentlyBuilding
setBuildHangDetails
in interface CurrentlyBuilding
@Nullable public @Nullable BuildCancelledDetails getBuildCancelledDetails()
getBuildCancelledDetails
in interface CurrentlyBuilding
public void setBuildCancelledDetails(@Nullable @Nullable BuildCancelledDetails buildCancelledDetails)
setBuildCancelledDetails
in interface CurrentlyBuilding
public BuildQueueTimeoutDetails getBuildQueueTimeoutDetails()
CurrentlyBuilding
getBuildQueueTimeoutDetails
in interface CurrentlyBuilding
public void setBuildQueueTimeoutDetails(BuildQueueTimeoutDetails buildQueueTimeoutDetails)
CurrentlyBuilding
setBuildQueueTimeoutDetails
in interface CurrentlyBuilding
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.