Class FakeAgentPool
- java.lang.Object
-
- jetbrains.buildServer.serverSide.agentPools.FakeAgentPool
-
- All Implemented Interfaces:
AgentPool
,AgentPoolLimits
public class FakeAgentPool extends Object implements AgentPool
Created by Sergey.Pak on 5/13/2016.
-
-
Field Summary
Fields Modifier and Type Field Description Collection<Integer>
myAgentTypeIds
AgentPoolLimits
myDetails
Collection<String>
myProjectIds
-
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 FakeAgentPool(int id, String name)
FakeAgentPool(int id, String name, AgentPoolLimits details)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsProjectId(String projectId)
indicates whether current pools contain this projectId.int
getAgentPoolId()
Collection<Integer>
getAgentTypeIds()
int
getMaxAgents()
int
getMinAgents()
String
getName()
Collection<String>
getProjectIds()
Collection<String>
getProjectIds(boolean includeNonExisting)
boolean
isDefault()
boolean
isProjectPool()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.agentPools.AgentPool
getOwnerProjectId
-
-
-
-
Field Detail
-
myAgentTypeIds
public Collection<Integer> myAgentTypeIds
-
myProjectIds
public Collection<String> myProjectIds
-
myDetails
public AgentPoolLimits myDetails
-
-
Constructor Detail
-
FakeAgentPool
public FakeAgentPool(int id, String name)
-
FakeAgentPool
public FakeAgentPool(int id, String name, AgentPoolLimits details)
-
-
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
-
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)
- Since:
- 10.1
-
-