Interface AgentTypeManager
-
- All Superinterfaces:
AgentTypeStorage
- All Known Implementing Classes:
AgentTypeManagerImpl
,FakeAgentTypeManager
,SecuredAgentTypeManager
public interface AgentTypeManager extends AgentTypeStorage
- Author:
- Eugene Petrenko Created: 21.09.2009 12:53:08
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
assignAgentType(BuildAgentEx agent)
Creates agent type for specified agent if agent does not have one and assigns it to the agent.void
copyAgentTypeRestrictions(BuildTypeDescriptor originalBuildType, BuildTypeDescriptor newBuildType)
void
excludeRunConfigurationsFromAllowed(int agentTypeId, String[] buildTypeIds)
List<AgentCompatibility>
getAgentTypeCompatibilities(SAgentType agentType)
Set<String>
getCanRunConfigurations(int agentTypeId)
int
getNumberOfCompatibleConfigurations(SAgentType agentType)
int
getNumberOfIncompatibleConfigurations(SAgentType agentType)
int
getOrCreateAgentTypeId(AgentTypeKey key)
similar togetOrCreateAgentTypeId(jetbrains.buildServer.serverSide.agentTypes.AgentTypeKey, int)
, puts agentType to the "Default" pool, if it doesn't existint
getOrCreateAgentTypeId(AgentTypeKey key, int defaultRawPoolId)
Maps created agent type key into agentTypeId.BuildAgentManager.RunConfigurationPolicy
getRunConfigurationPolicy(int agentTypeId)
void
includeRunConfigurationsToAllowed(int agentTypeId, String[] buildTypeIds)
boolean
isCanRunConfiguration(int agentTypeId, BuildTypeDescriptor buildType)
void
migrateAgentTypeKey(AgentTypeKey currentKey, AgentTypeKey newKey)
void
setRunConfigurationPolicy(int agentTypeId, BuildAgentManager.RunConfigurationPolicy policy)
void
updateAgentType(int agentTypeId, AgentDescription agentDescription, boolean isInitialUpdate)
updates agent type parameters from the agent's parametersvoid
updateAgentType(BuildAgentEx agent, boolean isInitialUpdate)
updates agent type parameters from the agent's parameters-
Methods inherited from interface jetbrains.buildServer.serverSide.agentTypes.AgentTypeStorage
copyAgentTypeRestrictions, deleteAgentType, excludeBuildTypesFromAllowed, findAgentTypeById, findAgentTypeByKey, findAgentTypesByIds, getAgentTypeIds, getAgentTypeIdsByPool, getAgentTypePairs, getPolicy, includeBuildTypesToAllowed, invalidateCacheForAgentTypesFromPools, invalidateCacheForAllAgentTypes, invalidateCacheForOneAgentType, isAllowedToRun, removeBuildTypeFromAllLists, setPolicyKind, updateAgentTypeFromDB
-
-
-
-
Method Detail
-
updateAgentType
void updateAgentType(@NotNull BuildAgentEx agent, boolean isInitialUpdate)
updates agent type parameters from the agent's parameters- Parameters:
agent
- the agentisInitialUpdate
- if then this is the update of agent type parameters when the agent is first registered, if false then this is a periodical update which happens while the agent is already registered and runs some builds- Since:
- 2020.1.1
-
updateAgentType
void updateAgentType(int agentTypeId, @NotNull AgentDescription agentDescription, boolean isInitialUpdate)
updates agent type parameters from the agent's parameters- Parameters:
agentTypeId
- agent type idagentDescription
- agent descriptionisRuntimeUpdate
- whether the update is runtime (during agent operation). False means that update goes from agent start.- Since:
- 2020.1.1
-
assignAgentType
int assignAgentType(@NotNull BuildAgentEx agent)
Creates agent type for specified agent if agent does not have one and assigns it to the agent.- Parameters:
agent
-- Returns:
- id of new agent type
-
getOrCreateAgentTypeId
int getOrCreateAgentTypeId(@NotNull AgentTypeKey key)
similar togetOrCreateAgentTypeId(jetbrains.buildServer.serverSide.agentTypes.AgentTypeKey, int)
, puts agentType to the "Default" pool, if it doesn't exist- Specified by:
getOrCreateAgentTypeId
in interfaceAgentTypeStorage
- Parameters:
key
- agent type key which identifier is requested.- Returns:
-
getOrCreateAgentTypeId
int getOrCreateAgentTypeId(@NotNull AgentTypeKey key, int defaultRawPoolId)
Maps created agent type key into agentTypeId. This method should lookup to the storage or allocate new item.- Specified by:
getOrCreateAgentTypeId
in interfaceAgentTypeStorage
- Parameters:
key
- agent type key received from plugindefaultRawPoolId
- raw pool id to assign agent type to, if one doesn't exist.- Returns:
- agent type id
-
includeRunConfigurationsToAllowed
void includeRunConfigurationsToAllowed(int agentTypeId, @NotNull String[] buildTypeIds)
-
excludeRunConfigurationsFromAllowed
void excludeRunConfigurationsFromAllowed(int agentTypeId, @NotNull String[] buildTypeIds)
-
setRunConfigurationPolicy
void setRunConfigurationPolicy(int agentTypeId, @NotNull BuildAgentManager.RunConfigurationPolicy policy)
-
getRunConfigurationPolicy
@NotNull BuildAgentManager.RunConfigurationPolicy getRunConfigurationPolicy(int agentTypeId)
-
isCanRunConfiguration
boolean isCanRunConfiguration(int agentTypeId, @NotNull BuildTypeDescriptor buildType)
-
getNumberOfCompatibleConfigurations
int getNumberOfCompatibleConfigurations(@NotNull SAgentType agentType)
-
getNumberOfIncompatibleConfigurations
int getNumberOfIncompatibleConfigurations(@NotNull SAgentType agentType)
-
getAgentTypeCompatibilities
@NotNull List<AgentCompatibility> getAgentTypeCompatibilities(@NotNull SAgentType agentType)
-
copyAgentTypeRestrictions
void copyAgentTypeRestrictions(@NotNull BuildTypeDescriptor originalBuildType, @NotNull BuildTypeDescriptor newBuildType)
-
migrateAgentTypeKey
void migrateAgentTypeKey(@NotNull AgentTypeKey currentKey, @NotNull AgentTypeKey newKey)
-
-