Class AgentDescriptionBase
- java.lang.Object
-
- jetbrains.buildServer.serverSide.agentTypes.AgentDescriptionBase
-
- All Implemented Interfaces:
AgentDescription
,MutableAgentDescription
- Direct Known Subclasses:
AgentDetailsDescription
,AgentTypeData
,AgentTypeProperties
,MockAgentDescription
,MutableAgentDescriptionProxy
public abstract class AgentDescriptionBase extends Object implements MutableAgentDescription
- Author:
- Eugene Petrenko Created: 21.07.2010 12:58:18
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getAvailableParameters()
Returns map of parameters available on the agent.String
getAvailableParameterValue(String parameterName)
Returns value of a single available parameter.Map<String,String>
getBuildParameters()
Returns map of build parameters that will be added to the build parameters when build is started on the agent.Map<String,String>
getConfigurationParameters()
Returns map of configuration parameters that are defined on the build agent.int
getCpuCount()
Returns the number of CPUs of this agentMap<String,String>
getDefinedParameters()
Returns map of parameters explicitly defined in the agent configuration file.boolean
isCaseInsensitiveEnvironment()
protected static boolean
isCaseInsensitiveEnvironment(String osName)
boolean
isEphemeral()
Indicates whether these parameters only exist in memory and represent description of a particular agentvoid
updateParameters(Map<String,String> newConfigParams, Map<String,String> newBuildParams)
Applies parameters update from the given maps-
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.AgentDescription
getAvailableRunTypeIds, getAvailableRunTypes, getAvailableVcsPlugins, getCpuBenchmarkIndex, getOperatingSystemName
-
-
-
-
Method Detail
-
getDefinedParameters
@NotNull public final Map<String,String> getDefinedParameters()
Description copied from interface:AgentDescription
Returns map of parameters explicitly defined in the agent configuration file.- Specified by:
getDefinedParameters
in interfaceAgentDescription
- Returns:
- see above
-
isCaseInsensitiveEnvironment
public boolean isCaseInsensitiveEnvironment()
- Specified by:
isCaseInsensitiveEnvironment
in interfaceAgentDescription
- Returns:
- true if names of environment variables are case insensitive
-
isCaseInsensitiveEnvironment
protected static boolean isCaseInsensitiveEnvironment(@NotNull String osName)
-
getAvailableParameters
@NotNull public Map<String,String> getAvailableParameters()
Description copied from interface:AgentDescription
Returns map of parameters available on the agent. These parameters include environment variables defined for the agent process as well as parameters defined in the agent configuration file.- Specified by:
getAvailableParameters
in interfaceAgentDescription
- Returns:
- see above
-
getAvailableParameterValue
@Nullable public String getAvailableParameterValue(@NotNull String parameterName)
Description copied from interface:AgentDescription
Returns value of a single available parameter. This is equivalent to {@link #getAvailableParameters().get(name)} but can work faster.- Specified by:
getAvailableParameterValue
in interfaceAgentDescription
- Parameters:
parameterName
- name of the parameter- Returns:
- see above
-
getBuildParameters
@NotNull public Map<String,String> getBuildParameters()
Description copied from interface:AgentDescription
Returns map of build parameters that will be added to the build parameters when build is started on the agent. Keys in the map have prefixesConstants.SYSTEM_PREFIX
orConstants.ENV_PREFIX
- Specified by:
getBuildParameters
in interfaceAgentDescription
- Returns:
- map of build parameters.
-
getConfigurationParameters
@NotNull public Map<String,String> getConfigurationParameters()
Description copied from interface:AgentDescription
Returns map of configuration parameters that are defined on the build agent. Those parameters may be defined in agent configuration files or may be provided by agent plugins.- Specified by:
getConfigurationParameters
in interfaceAgentDescription
- Returns:
- map of parameters
-
getCpuCount
public int getCpuCount()
Description copied from interface:AgentDescription
Returns the number of CPUs of this agent- Specified by:
getCpuCount
in interfaceAgentDescription
- Returns:
- number of CPUs or -1 if count is not available
-
updateParameters
public void updateParameters(@Nullable Map<String,String> newConfigParams, @Nullable Map<String,String> newBuildParams)
Description copied from interface:MutableAgentDescription
Applies parameters update from the given maps- Specified by:
updateParameters
in interfaceMutableAgentDescription
- Parameters:
newConfigParams
- config parameters to updatenewBuildParams
- build parameters to update
-
isEphemeral
public boolean isEphemeral()
Indicates whether these parameters only exist in memory and represent description of a particular agent- Returns:
-
-