public class RemoteAgentManagerImpl extends Object implements RemoteAgentManager
Constructor and Description |
---|
RemoteAgentManagerImpl(int heartbeatTimeoutSeconds,
StartupStatisticsBean startupStatisticsBean,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
void |
addRemoteAgentLogEntry(String logEntry) |
void |
bootstrapping(String agentHostName)
Notifies the
RemoteAgentManager that a remote agent has commenced bootstrapping. |
void |
bootstrappingElastic(String agentHostName,
String instanceId)
Notifies the
RemoteAgentManager that an elastic agent has commenced bootstrapping. |
void |
checkOfflineAgents()
Runs a check for offline remote agents.
|
List<String> |
getRemoteAgentLog() |
boolean |
isRemoteAgentFunctionEnabled()
Checks whether the remote agent functionality is currently enabled.
|
PipelineDefinition |
registerAgent(PipelineDefinition remoteAgentDefinition)
Initial setup / verification of the agent.
|
RemotableRemoteAgentDefinition |
registerAgent(RemotableRemoteAgentDefinition remotableRemoteAgentDefinition)
Initial setup / verification of the agent.
|
void |
setHeartbeatCheckInterval(int heartbeatCheckInterval) |
void |
setRemoteAgentFunctionEnabled(boolean remoteAgentFunctionEnabled)
Controls whether the remote agent functionality of Bamboo is enabled.
|
void |
setUri(String uri) |
void |
start() |
void |
stopConnectors() |
void |
stopRemoteAgent(BuildAgent agent) |
AgentHeartBeatInfo |
updateRemoteAgentStatus(Long agentId,
UUID uuid,
AgentStatus newStatus,
SystemInfo systemInfo)
Updates the
BuildAgent 's status representing a remote agent on the local server. |
public RemoteAgentManagerImpl(int heartbeatTimeoutSeconds, StartupStatisticsBean startupStatisticsBean, com.atlassian.event.api.EventPublisher eventPublisher)
@NotNull public RemotableRemoteAgentDefinition registerAgent(@NotNull RemotableRemoteAgentDefinition remotableRemoteAgentDefinition)
RemotedRemoteAgentManager
registerAgent
in interface RemotedRemoteAgentManager
remotableRemoteAgentDefinition
- - id may be -1 if the build is new@NotNull public PipelineDefinition registerAgent(@NotNull PipelineDefinition remoteAgentDefinition) throws BambooLicenseException
RemoteAgentManager
registerAgent
in interface RemoteAgentManager
remoteAgentDefinition
- - id may be -1 if the build is newBambooLicenseException
public AgentHeartBeatInfo updateRemoteAgentStatus(@NotNull Long agentId, @Nullable UUID uuid, @NotNull AgentStatus newStatus, @NotNull SystemInfo systemInfo)
RemoteAgentManager
BuildAgent
's status representing a remote agent on the local server.updateRemoteAgentStatus
in interface RemoteAgentManager
agentId
- ID of the agentuuid
- UUID of the agentnewStatus
- agent statussystemInfo
- agent system infopublic void checkOfflineAgents()
RemoteAgentManager
checkOfflineAgents
in interface RemoteAgentManager
public void setRemoteAgentFunctionEnabled(boolean remoteAgentFunctionEnabled) throws Exception
RemoteAgentManager
Controls whether the remote agent functionality of Bamboo is enabled.
setRemoteAgentFunctionEnabled
in interface RemoteAgentManager
remoteAgentFunctionEnabled
- true
if remote agent functionality should be enabled; false
otherwise.Exception
- on any errorpublic boolean isRemoteAgentFunctionEnabled()
RemoteAgentManager
isRemoteAgentFunctionEnabled
in interface RemoteAgentManager
true
, if remote agent functionality is enabled, false
otherwisepublic void stopRemoteAgent(@NotNull BuildAgent agent)
stopRemoteAgent
in interface RemoteAgentManager
public void bootstrapping(String agentHostName)
RemoteAgentManager
Notifies the RemoteAgentManager
that a remote agent has commenced bootstrapping.
bootstrapping
in interface RemoteAgentManager
agentHostName
- The host name or IP address of the host on which the remote agent is running. null
if unknown.public void bootstrappingElastic(String agentHostName, @Nullable String instanceId)
RemoteAgentManager
Notifies the RemoteAgentManager
that an elastic agent has commenced bootstrapping.
bootstrappingElastic
in interface RemoteAgentManager
agentHostName
- The host name or IP address of the host on which the remote agent is running.
null
if unknown.instanceId
- the instance the elastic agent is loading onpublic void addRemoteAgentLogEntry(String logEntry)
addRemoteAgentLogEntry
in interface RemoteAgentManager
public void stopConnectors() throws Exception
stopConnectors
in interface RemoteAgentManager
Exception
public void start() throws Exception
start
in interface RemoteAgentManager
Exception
public List<String> getRemoteAgentLog()
getRemoteAgentLog
in interface RemoteAgentManager
public void setHeartbeatCheckInterval(int heartbeatCheckInterval)
public void setUri(String uri)
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.