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 BambooIdProvider
getId
in interface BuildAgent
public String getName()
getName
in interface NameProvider
getName
in interface BuildAgent
public AgentType getType()
getType
in interface BuildAgent
public boolean isActive()
isActive
in interface BuildAgent
public boolean isEnabled()
isEnabled
in interface BuildAgent
@NotNull public AgentStatus getAgentStatus()
getAgentStatus
in interface BuildAgent
public boolean isUnresponsive()
BuildAgent
Used for remote agents.
isUnresponsive
in interface BuildAgent
public void setUnresponsive(boolean unresponsive)
setUnresponsive
in interface BuildAgent
public void setAgentStatus(@NotNull AgentStatus newAgentStatus)
public boolean isBusy()
BuildAgent
isBusy
in interface BuildAgent
public Date getLastUpdated()
public void setLastUpdated(Date lastUpdated)
@Nullable public Date getRemoteTimestamp()
public void setRemoteTimestamp(Date remoteTimestamp)
@Nullable public SystemInfo getSystemInfo()
HasSystemInfo
null
if not yet initialized.getSystemInfo
in interface HasSystemInfo
public boolean hasSystemInfo()
HasSystemInfo
true
, HasSystemInfo.getSystemInfo()
will always return non-null
valuehasSystemInfo
in interface HasSystemInfo
true
, if this agent has system infopublic void setSystemInfo(SystemInfo systemInfo)
public boolean isRequestedToBeStopped()
BuildAgent
isRequestedToBeStopped
in interface BuildAgent
public void setRequestedToBeStopped(boolean requestedToBeStopped)
setRequestedToBeStopped
in interface BuildAgent
@NotNull public PipelineDefinition getDefinition()
getDefinition
in interface BuildAgent
public void setDefinition(@NotNull PipelineDefinition definition)
setDefinition
in interface BuildAgent
public void accept(BuildAgent.BuildAgentVisitor buildAgentVisitor)
BuildAgent
accept
in interface BuildAgent
public boolean isDedicated()
isDedicated
in interface BuildAgent
public int compareTo(BuildAgent o)
compareTo
in interface Comparable<BuildAgent>
public void setUuid(UUID uuid)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.