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.StringgetAvailableParameterValue(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.intgetCpuCount()Returns the number of CPUs of this agentMap<String,String>getDefinedParameters()Returns map of parameters explicitly defined in the agent configuration file.booleanisCaseInsensitiveEnvironment()protected static booleanisCaseInsensitiveEnvironment(String osName)booleanisEphemeral()Indicates whether these parameters only exist in memory and represent description of a particular agentvoidupdateParameters(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:AgentDescriptionReturns map of parameters explicitly defined in the agent configuration file.- Specified by:
getDefinedParametersin interfaceAgentDescription- Returns:
- see above
-
isCaseInsensitiveEnvironment
public boolean isCaseInsensitiveEnvironment()
- Specified by:
isCaseInsensitiveEnvironmentin 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:AgentDescriptionReturns 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:
getAvailableParametersin interfaceAgentDescription- Returns:
- see above
-
getAvailableParameterValue
@Nullable public String getAvailableParameterValue(@NotNull String parameterName)
Description copied from interface:AgentDescriptionReturns value of a single available parameter. This is equivalent to {@link #getAvailableParameters().get(name)} but can work faster.- Specified by:
getAvailableParameterValuein interfaceAgentDescription- Parameters:
parameterName- name of the parameter- Returns:
- see above
-
getBuildParameters
@NotNull public Map<String,String> getBuildParameters()
Description copied from interface:AgentDescriptionReturns 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_PREFIXorConstants.ENV_PREFIX- Specified by:
getBuildParametersin interfaceAgentDescription- Returns:
- map of build parameters.
-
getConfigurationParameters
@NotNull public Map<String,String> getConfigurationParameters()
Description copied from interface:AgentDescriptionReturns 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:
getConfigurationParametersin interfaceAgentDescription- Returns:
- map of parameters
-
getCpuCount
public int getCpuCount()
Description copied from interface:AgentDescriptionReturns the number of CPUs of this agent- Specified by:
getCpuCountin 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:MutableAgentDescriptionApplies parameters update from the given maps- Specified by:
updateParametersin 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:
-
-