public class BuildAgentImpl extends Object implements BuildAgent, HasUuid, HasSystemInfo
BuildAgent.BuildAgentVisitor| Modifier | Constructor and Description |
|---|---|
protected |
BuildAgentImpl(LocalAgentDefinition definition) |
|
BuildAgentImpl(PipelineDefinition definition,
AgentStatus agentStatus) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(BuildAgent.BuildAgentVisitor buildAgentVisitor)
Runs the appropriate visitor method depending on which type of agent it is
|
int |
compareTo(BuildAgent o) |
boolean |
equals(Object o) |
AgentStatus |
getAgentStatus() |
PipelineDefinition |
getDefinition() |
long |
getId() |
Date |
getLastUpdated() |
String |
getName() |
Date |
getRemoteTimestamp() |
SystemInfo |
getSystemInfo()
Gets the system info, which may be
null if not yet initialized. |
AgentType |
getType() |
UUID |
getUuid()
Get UUID of this agent
|
int |
hashCode() |
boolean |
hasSystemInfo()
Checks whether system info for this agent has been initialized.
|
boolean |
hasUuid()
Check whether this agent has already been assigned its UUID
|
boolean |
isActive() |
boolean |
isBusy()
Returns true if an agent is building or is cancelling a build
|
boolean |
isDedicated() |
boolean |
isEnabled() |
boolean |
isRequestedToBeStopped()
Whether or not a call has been made to shutdown the agent after the current build has finished
|
boolean |
isUnresponsive()
Whether or not the agent has been deemed to be "unresponsive".
|
void |
setAgentStatus(AgentStatus newAgentStatus) |
void |
setDefinition(PipelineDefinition definition) |
void |
setLastUpdated(Date lastUpdated) |
void |
setRemoteTimestamp(Date remoteTimestamp) |
void |
setRequestedToBeStopped(boolean requestedToBeStopped) |
void |
setSystemInfo(SystemInfo systemInfo) |
void |
setUnresponsive(boolean unresponsive) |
void |
setUuid(UUID uuid) |
String |
toString() |
public BuildAgentImpl(@NotNull
PipelineDefinition definition,
@NotNull
AgentStatus agentStatus)
protected BuildAgentImpl(LocalAgentDefinition definition)
public long getId()
getId in interface BambooIdProvidergetId in interface BuildAgentpublic String getName()
getName in interface NameProvidergetName in interface BuildAgentpublic AgentType getType()
getType in interface BuildAgentpublic boolean isActive()
isActive in interface BuildAgentpublic boolean isEnabled()
isEnabled in interface BuildAgent@NotNull public AgentStatus getAgentStatus()
getAgentStatus in interface BuildAgentpublic boolean isUnresponsive()
BuildAgentUsed for remote agents.
isUnresponsive in interface BuildAgentpublic void setUnresponsive(boolean unresponsive)
setUnresponsive in interface BuildAgentpublic void setAgentStatus(@NotNull
AgentStatus newAgentStatus)
public boolean isBusy()
BuildAgentisBusy in interface BuildAgentpublic Date getLastUpdated()
public void setLastUpdated(Date lastUpdated)
@Nullable public Date getRemoteTimestamp()
public void setRemoteTimestamp(Date remoteTimestamp)
@Nullable public SystemInfo getSystemInfo()
HasSystemInfonull if not yet initialized.getSystemInfo in interface HasSystemInfopublic boolean hasSystemInfo()
HasSystemInfotrue, HasSystemInfo.getSystemInfo()
will always return non-null valuehasSystemInfo in interface HasSystemInfotrue, if this agent has system infopublic void setSystemInfo(SystemInfo systemInfo)
public boolean isRequestedToBeStopped()
BuildAgentisRequestedToBeStopped in interface BuildAgentpublic void setRequestedToBeStopped(boolean requestedToBeStopped)
setRequestedToBeStopped in interface BuildAgent@NotNull public PipelineDefinition getDefinition()
getDefinition in interface BuildAgentpublic void setDefinition(@NotNull
PipelineDefinition definition)
setDefinition in interface BuildAgentpublic void accept(BuildAgent.BuildAgentVisitor buildAgentVisitor)
BuildAgentaccept in interface BuildAgentpublic boolean isDedicated()
isDedicated in interface BuildAgentpublic int compareTo(BuildAgent o)
compareTo in interface Comparable<BuildAgent>public void setUuid(UUID uuid)
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.