Class ProjectAgentPoolImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.agentPools.ProjectAgentPoolImpl
-
- All Implemented Interfaces:
Loggable,AgentPool,AgentPoolLimits,ReadOnlyAgentPool
public class ProjectAgentPoolImpl extends Object implements ReadOnlyAgentPool, Loggable
-
-
Field Summary
Fields Modifier and Type Field Description static StringNON_EXISTING_PROJECT_POOL_NAME-
Fields inherited from interface jetbrains.buildServer.serverSide.agentPools.AgentPool
DEFAULT_POOL_ID, DEFAULT_POOL_NAME, PROJECT_POOL_PLACEHOLDER, UNASSIGNED_POOL_PLACEHOLDER
-
Fields inherited from interface jetbrains.buildServer.serverSide.agentPools.AgentPoolLimits
DEFAULT, UNLIMITED
-
-
Constructor Summary
Constructors Constructor Description ProjectAgentPoolImpl(int poolId, String projectId, ProjectManager projectManager, AgentPoolManager agentPoolManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsProjectId(String projectId)indicates whether current pools contain this projectId.Stringdescribe(boolean verbose)intgetAgentPoolId()Collection<Integer>getAgentTypeIds()intgetMaxAgents()intgetMinAgents()StringgetName()StringgetOwnerProjectId()StringgetProjectExtId()StringgetProjectId()Collection<String>getProjectIds()Collection<String>getProjectIds(boolean includeNonExisting)booleanisDefault()booleanisProjectPool()
-
-
-
Field Detail
-
NON_EXISTING_PROJECT_POOL_NAME
public static final String NON_EXISTING_PROJECT_POOL_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ProjectAgentPoolImpl
public ProjectAgentPoolImpl(int poolId, @NotNull String projectId, @NotNull ProjectManager projectManager, @NotNull AgentPoolManager agentPoolManager)
-
-
Method Detail
-
getMaxAgents
public int getMaxAgents()
- Specified by:
getMaxAgentsin interfaceAgentPoolLimits- Returns:
- maximum number of agents which can be added to the pool, -1 means unlimited
-
getMinAgents
public int getMinAgents()
- Specified by:
getMinAgentsin interfaceAgentPoolLimits- Returns:
- minimum number of agents which should be preserved in the pool
-
getAgentPoolId
public int getAgentPoolId()
- Specified by:
getAgentPoolIdin interfaceAgentPool- Returns:
- agent pool id
-
isDefault
public boolean isDefault()
-
getName
@NotNull public String getName()
-
getProjectIds
@NotNull public Collection<String> getProjectIds()
- Specified by:
getProjectIdsin interfaceAgentPool- Returns:
- collection of projectIds associated with this pool. Only projectIds loaded into project model are returned
-
getProjectIds
@NotNull public Collection<String> getProjectIds(boolean includeNonExisting)
- Specified by:
getProjectIdsin interfaceAgentPool- Parameters:
includeNonExisting- whether to include non-existing projectIds into result- Returns:
- collection of projectIds associated with this pool. Only projectIds loaded into project model are returned
-
containsProjectId
public boolean containsProjectId(@NotNull String projectId)Description copied from interface:AgentPoolindicates whether current pools contain this projectId. This method checks against DB data, not against current project model- Specified by:
containsProjectIdin interfaceAgentPool- Returns:
- see above
-
getProjectId
@NotNull public String getProjectId()
-
getProjectExtId
@Nullable public String getProjectExtId()
-
getAgentTypeIds
@NotNull public Collection<Integer> getAgentTypeIds()
- Specified by:
getAgentTypeIdsin interfaceAgentPool- Returns:
- collection of agent type ids associated with this pool
-
isProjectPool
public boolean isProjectPool()
- Specified by:
isProjectPoolin interfaceAgentPool- Returns:
- indicates whether this agent pool is virtual (i.e. not persisted to DB)
-
getOwnerProjectId
@Nullable public String getOwnerProjectId()
- Specified by:
getOwnerProjectIdin interfaceAgentPool- Returns:
- for a project pool returns an internal id of a project which is the owner of the pool, for a non project pool returns null
-
-