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 BuildAgentExfindAgentById(int agentId, boolean searchUnregistered)Searches for an agent with specified id among registered and unregistered agents.BuildAgentExfindAgentByName(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.voidpingAllAgents()BuildAgentExregisterAgent(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.booleanregistrationIsTemporallyNotAvailable()voidsetAgentDistributionMonitor(AgentDistributionMonitor agentDistributionMonitor)voidunregisterAgent(int agentId)voidunregisterAgent(int id, String reason)voidunregisterAllAgents(String reason, boolean shouldCancelRunningBuilds)voidupdateAgentParameters(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:BuildAgentManagerReturns all registered authorized agents. Registered means connected at the moment of call.- Specified by:
getRegisteredAgentsin interfaceBuildAgentManager- Returns:
- see above
-
getRegisteredAgents
List<BuildAgentEx> getRegisteredAgents(boolean includeUnauthorized)
Description copied from interface:BuildAgentManagerReturns all registered agents. Registered means connected at the moment of call.- Specified by:
getRegisteredAgentsin 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:BuildAgentManagerReturns 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:
getUnregisteredAgentsin interfaceBuildAgentManager- Returns:
- list of all currently unregistered agents
-
getUnregisteredAgents
List<BuildAgentEx> getUnregisteredAgents(boolean includeUnauthorized)
Description copied from interface:BuildAgentManagerReturns list of all currently unregistered agents, with additional filter based on authorization status. See alsoBuildAgentManager.getUnregisteredAgents()- Specified by:
getUnregisteredAgentsin 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:BuildAgentManagerSearches for an agent with specified id among registered and unregistered agents.- Specified by:
findAgentByIdin 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:BuildAgentManagerSearches for an agent with specified name among registered and unregistered agents.- Specified by:
findAgentByNamein 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()
-
-