jetbrains.buildServer.serverSide.buildDistribution
Interface AgentsFilterContext

All Known Implementing Classes:
DefaultAgentsFilterContext

public interface AgentsFilterContext

Starting build agents filter context. Contains information which might be required to filter agents of the starting build.

Since:
6.0

Method Summary
 java.util.Collection<SBuildAgent> getAgentsForStartingBuild()
          Returns agents available for the starting build.
 java.lang.Object getCustomData(java.lang.String key)
          Gets custom data, associated with specified key
 java.util.Map<QueuedBuildInfo,SBuildAgent> getDistributedBuilds()
          Returns map of the builds already distributed by agents.
 BuildDistributorInput getDistributorInput()
          Returns agent distributor input (running builds, queue, agents and so on).
 QueuedBuildInfo getStartingBuild()
          The build which is going to start, i.e.
 boolean isEmulationMode()
          Returns true if the filter is called in the emulation mode.
 void setCustomData(java.lang.String key, java.lang.Object data)
          Sets data in the context under specified key
 

Method Detail

getStartingBuild

@NotNull
QueuedBuildInfo getStartingBuild()
The build which is going to start, i.e. the build for which the agents are being filtered.

Returns:
see above

getAgentsForStartingBuild

@NotNull
java.util.Collection<SBuildAgent> getAgentsForStartingBuild()
Returns agents available for the starting build.

Returns:
see above

getDistributedBuilds

@NotNull
java.util.Map<QueuedBuildInfo,SBuildAgent> getDistributedBuilds()
Returns map of the builds already distributed by agents. This map cannot be edited.

Returns:
see above

getDistributorInput

@NotNull
BuildDistributorInput getDistributorInput()
Returns agent distributor input (running builds, queue, agents and so on).

Returns:
see above

isEmulationMode

boolean isEmulationMode()
Returns true if the filter is called in the emulation mode. Emulation mode is used to compute estimates, not to start builds.

Returns:
see above

getCustomData

@Nullable
java.lang.Object getCustomData(@NotNull
                                        java.lang.String key)
Gets custom data, associated with specified key

Parameters:
key - of the data
Returns:
object, stored under key, if there is one, null otherwise
Since:
8.0

setCustomData

void setCustomData(@NotNull
                   java.lang.String key,
                   @Nullable
                   java.lang.Object data)
Sets data in the context under specified key

Parameters:
key - key to store data unde
data - data to store
Since:
8.0 Providing null as data will erase existing one