@ThreadSafe public class CurrentlyBuildingImpl extends Object implements CurrentlyBuilding
Modifier and Type | Class and Description |
---|---|
static class |
CurrentlyBuildingImpl.ExecutableInfoImpl
This class is persisted by XStream as a part of CurrentlyBuildingImpl.
|
CurrentlyBuilding.ExecutableInfo
Constructor and Description |
---|
CurrentlyBuildingImpl(BuildIdentifier buildIdentifier,
BuildChanges buildChanges,
TriggerReason triggerReason,
Long averageDuration) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
long |
getAverageDuration()
Estimated total execution time of a task.
|
Long |
getBuildAgentId()
The current build agent id iff the build is current building on an agent.
|
BuildCancelledDetails |
getBuildCancelledDetails() |
BuildChanges |
getBuildChanges()
Changes associated with current build
|
BuildHungDetails |
getBuildHangDetails()
Details about the build if it hung.
|
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.
|
Collection<BuildAgent> |
getExecutableBuildAgents()
Get the list of executable agents for this build.
|
Collection<ElasticImageConfiguration> |
getExecutableElasticImages()
Get the list of elastic images that can execute this plan.
|
CurrentlyBuilding.ExecutableInfo |
getExecutableInfo() |
PlanResultKey |
getPlanResultKey() |
BuildProgressBar |
getProgressBar()
Because of XStream deserialization we need to lazy initialize buildProgressBar in getter
|
Date |
getQueueTime()
The
Date when the build was originally queued |
Date |
getStartTime()
When was the execution started.
|
TriggerReason |
getTriggerReason()
The trigger reason of the current build
|
Date |
getVcsUpdateTime()
The time
Date when updating / checking out source repository began |
boolean |
hasExecutableAgents()
Determine whether this plan currently has any agent that can run it.
|
int |
hashCode() |
boolean |
isCurrentlyQueuedOnly()
Is the build queued?
|
boolean |
isUpdatingVcs() |
void |
setBuildAgentId(Long buildAgentId)
Sets the fact that the build will now be building on an agent
|
void |
setBuildCancelledDetails(BuildCancelledDetails buildCancelledDetails) |
void |
setBuildHangDetails(BuildHungDetails buildHungDetails)
Set the details if the build was detected to be hung.
|
void |
setBuildQueueTimeoutDetails(BuildQueueTimeoutDetails buildQueueTimeoutDetails)
Sets build queue timeout details
|
void |
setExecutableInfo(CurrentlyBuilding.ExecutableInfo executableInfo)
Set the information about the current agents and elastic images.
|
void |
setVcsUpdateTime(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 PlanResultKey getPlanResultKey()
@NotNull public BuildIdentifier getBuildIdentifier()
ExecutionStatus
getBuildIdentifier
in interface ExecutionStatus
@NotNull public BuildChanges getBuildChanges()
ExecutionStatus
getBuildChanges
in interface ExecutionStatus
@NotNull public TriggerReason getTriggerReason()
ExecutionStatus
getTriggerReason
in interface ExecutionStatus
@NotNull public BuildProgressBar getProgressBar()
getProgressBar
in interface ExecutionStatus
public long getAverageDuration()
ExecutionStatus
getAverageDuration
in interface ExecutionStatus
public boolean tryToFinish()
CurrentlyBuilding
tryToFinish
in interface CurrentlyBuilding
public CurrentlyBuilding.ExecutableInfo getExecutableInfo()
public void setExecutableInfo(@NotNull CurrentlyBuilding.ExecutableInfo executableInfo)
CurrentlyBuilding
setExecutableInfo
in interface CurrentlyBuilding
executableInfo
- to set.@NotNull public Collection<BuildAgent> getExecutableBuildAgents()
CurrentlyBuilding
getExecutableBuildAgents
in interface CurrentlyBuilding
BuildAgent
which can execute this build.public boolean hasExecutableAgents()
CurrentlyBuilding
hasExecutableAgents
in interface CurrentlyBuilding
@NotNull public Collection<ElasticImageConfiguration> getExecutableElasticImages()
CurrentlyBuilding
getExecutableElasticImages
in interface CurrentlyBuilding
ElasticImageConfiguration
which can execute this plan@Nullable public Long getBuildAgentId()
CurrentlyBuilding
getBuildAgentId
in interface CurrentlyBuilding
public void setBuildAgentId(@Nullable Long buildAgentId)
CurrentlyBuilding
setBuildAgentId
in interface CurrentlyBuilding
public boolean isCurrentlyQueuedOnly()
CurrentlyBuilding
isCurrentlyQueuedOnly
in interface CurrentlyBuilding
@Nullable public Date getStartTime()
ExecutionStatus
getStartTime
in interface ExecutionStatus
@NotNull public Date getQueueTime()
CurrentlyBuilding
Date
when the build was originally queuedgetQueueTime
in interface ExecutionStatus
getQueueTime
in interface CurrentlyBuilding
@Nullable public Date getVcsUpdateTime()
CurrentlyBuilding
Date
when updating / checking out source repository begangetVcsUpdateTime
in interface CurrentlyBuilding
public void setVcsUpdateTime(@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 BuildHungDetails getBuildHangDetails()
CurrentlyBuilding
getBuildHangDetails
in interface CurrentlyBuilding
public void setBuildHangDetails(@Nullable BuildHungDetails buildHungDetails)
CurrentlyBuilding
setBuildHangDetails
in interface CurrentlyBuilding
@Nullable public BuildCancelledDetails getBuildCancelledDetails()
getBuildCancelledDetails
in interface CurrentlyBuilding
public void setBuildCancelledDetails(@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 © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.