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 String
NON_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 boolean
containsProjectId(String projectId)
indicates whether current pools contain this projectId.String
describe(boolean verbose)
int
getAgentPoolId()
Collection<Integer>
getAgentTypeIds()
int
getMaxAgents()
int
getMinAgents()
String
getName()
String
getOwnerProjectId()
String
getProjectExtId()
String
getProjectId()
Collection<String>
getProjectIds()
Collection<String>
getProjectIds(boolean includeNonExisting)
boolean
isDefault()
boolean
isProjectPool()
-
-
-
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:
getMaxAgents
in interfaceAgentPoolLimits
- Returns:
- maximum number of agents which can be added to the pool, -1 means unlimited
-
getMinAgents
public int getMinAgents()
- Specified by:
getMinAgents
in interfaceAgentPoolLimits
- Returns:
- minimum number of agents which should be preserved in the pool
-
getAgentPoolId
public int getAgentPoolId()
- Specified by:
getAgentPoolId
in interfaceAgentPool
- Returns:
- agent pool id
-
isDefault
public boolean isDefault()
-
getName
@NotNull public String getName()
-
getProjectIds
@NotNull public Collection<String> getProjectIds()
- Specified by:
getProjectIds
in 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:
getProjectIds
in 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:AgentPool
indicates whether current pools contain this projectId. This method checks against DB data, not against current project model- Specified by:
containsProjectId
in interfaceAgentPool
- Returns:
- see above
-
getProjectId
@NotNull public String getProjectId()
-
getProjectExtId
@Nullable public String getProjectExtId()
-
getAgentTypeIds
@NotNull public Collection<Integer> getAgentTypeIds()
- Specified by:
getAgentTypeIds
in interfaceAgentPool
- Returns:
- collection of agent type ids associated with this pool
-
isProjectPool
public boolean isProjectPool()
- Specified by:
isProjectPool
in interfaceAgentPool
- Returns:
- indicates whether this agent pool is virtual (i.e. not persisted to DB)
-
getOwnerProjectId
@Nullable public String getOwnerProjectId()
- Specified by:
getOwnerProjectId
in 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
-
-