Package jetbrains.buildServer.serverSide
Interface BuildAgentManagerEx
-
- All Superinterfaces:
BuildAgentManager
- All Known Implementing Classes:
BuildAgentManagerImpl
,SecuredBuildAgentManager
public interface BuildAgentManagerEx extends BuildAgentManager
- Author:
- Pavel.Sher Date: 20.05.2007
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.serverSide.BuildAgentManager
BuildAgentManager.RunConfigurationPolicy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BuildAgentEx
findAgentById(int agentId, boolean searchUnregistered)
Searches for an agent with specified id among registered and unregistered agents.BuildAgentEx
findAgentByName(String agentName, boolean searchUnregistered)
Searches for an agent with specified name among registered and unregistered agents.List<BuildAgentEx>
findAgentsByAgentTypeIds(Set<Integer> agentTypeIds, boolean searchUnregistered)
List<BuildAgentEx>
getAllAgents()
List<BuildAgentEx>
getAllAgents(boolean includeUnauthorized)
List<BuildAgentEx>
getRegisteredAgents()
Returns all registered authorized agents.List<BuildAgentEx>
getRegisteredAgents(boolean includeUnauthorized)
Returns all registered agents.List<BuildAgentEx>
getUnregisteredAgents()
Returns list of all currently unregistered and authorized agents, i.e.List<BuildAgentEx>
getUnregisteredAgents(boolean includeUnauthorized)
Returns list of all currently unregistered agents, with additional filter based on authorization status.void
pingAllAgents()
BuildAgentEx
registerAgent(BuildAgentEx agent, long currentlyRunningBuildId)
Returns the registered agent - the same instance as was passed in the parameters if this is a new registration, or another instance if such agent is already registered.boolean
registrationIsTemporallyNotAvailable()
void
setAgentDistributionMonitor(AgentDistributionMonitor agentDistributionMonitor)
void
unregisterAgent(int agentId)
void
unregisterAgent(int id, String reason)
void
unregisterAllAgents(String reason, boolean shouldCancelRunningBuilds)
void
updateAgentParameters(int agentId, String authorizationToken, AgentDescription newAgentDescription)
Sets agent parameters to the database.-
Methods inherited from interface jetbrains.buildServer.serverSide.BuildAgentManager
getAgentCompatibilities, getCanRunConfigurations, getNumberOfCompatibleConfigurations, getNumberOfIncompatibleConfigurations, getNumberOfRegisteredAgents, getRunConfigurationPolicy, isCanRunConfiguration, removeAgent, setCanRunConfiguration, setRunConfigurationPolicy
-
-
-
-
Method Detail
-
registerAgent
@NotNull BuildAgentEx registerAgent(BuildAgentEx agent, long currentlyRunningBuildId) throws TeamCityRuntimeException
Returns the registered agent - the same instance as was passed in the parameters if this is a new registration, or another instance if such agent is already registered.- Throws:
TeamCityRuntimeException
-
updateAgentParameters
void updateAgentParameters(int agentId, @NotNull String authorizationToken, @NotNull AgentDescription newAgentDescription)
Sets agent parameters to the database.This method is called by an agent when its parameters are changes, i.e. if one of agent-side plugins has changed agents parameters.
-
unregisterAgent
void unregisterAgent(int agentId)
-
unregisterAgent
void unregisterAgent(int id, String reason)
-
unregisterAllAgents
void unregisterAllAgents(String reason, boolean shouldCancelRunningBuilds)
-
getRegisteredAgents
List<BuildAgentEx> getRegisteredAgents()
Description copied from interface:BuildAgentManager
Returns all registered authorized agents. Registered means connected at the moment of call.- Specified by:
getRegisteredAgents
in interfaceBuildAgentManager
- Returns:
- see above
-
getRegisteredAgents
List<BuildAgentEx> getRegisteredAgents(boolean includeUnauthorized)
Description copied from interface:BuildAgentManager
Returns all registered agents. Registered means connected at the moment of call.- Specified by:
getRegisteredAgents
in interfaceBuildAgentManager
- Parameters:
includeUnauthorized
- if true, unauthorized agents, i.e. agents which cannot run builds until authorized by admin- Returns:
- see above
-
pingAllAgents
void pingAllAgents()
-
getUnregisteredAgents
List<BuildAgentEx> getUnregisteredAgents()
Description copied from interface:BuildAgentManager
Returns list of all currently unregistered and authorized agents, i.e. agents registered on server some time ago, but currently unregistered by server because they are either not responding, or upgrading. This list doesn't include unauthorized agents. The list is sorted by agent registration date in reverse order.- Specified by:
getUnregisteredAgents
in interfaceBuildAgentManager
- Returns:
- list of all currently unregistered agents
-
getUnregisteredAgents
List<BuildAgentEx> getUnregisteredAgents(boolean includeUnauthorized)
Description copied from interface:BuildAgentManager
Returns list of all currently unregistered agents, with additional filter based on authorization status. See alsoBuildAgentManager.getUnregisteredAgents()
- Specified by:
getUnregisteredAgents
in interfaceBuildAgentManager
- Parameters:
includeUnauthorized
- whether to include or exclude unauthorized agents- Returns:
- list of all currently unregistered agents
-
getAllAgents
List<BuildAgentEx> getAllAgents()
-
getAllAgents
List<BuildAgentEx> getAllAgents(boolean includeUnauthorized)
-
findAgentById
@Nullable BuildAgentEx findAgentById(int agentId, boolean searchUnregistered)
Description copied from interface:BuildAgentManager
Searches for an agent with specified id among registered and unregistered agents.- Specified by:
findAgentById
in interfaceBuildAgentManager
- Parameters:
agentId
- id of the agent to searchsearchUnregistered
- true if unregistered agents should be searched too- Returns:
- found agent or null
-
findAgentByName
@Nullable BuildAgentEx findAgentByName(@NotNull String agentName, boolean searchUnregistered)
Description copied from interface:BuildAgentManager
Searches for an agent with specified name among registered and unregistered agents.- Specified by:
findAgentByName
in interfaceBuildAgentManager
- Parameters:
agentName
- name of the agent to searchsearchUnregistered
- true if unregistered agents should be searched too- Returns:
- found agent or null
-
findAgentsByAgentTypeIds
@NotNull List<BuildAgentEx> findAgentsByAgentTypeIds(@NotNull Set<Integer> agentTypeIds, boolean searchUnregistered)
-
setAgentDistributionMonitor
void setAgentDistributionMonitor(@NotNull AgentDistributionMonitor agentDistributionMonitor)
-
registrationIsTemporallyNotAvailable
boolean registrationIsTemporallyNotAvailable()
-
-