55 references to NodeAffinity
Microsoft.Build (55)
BackEnd\Components\Communications\INodeManager.cs (2)
23
/// <param name="affinity">The <see cref="
NodeAffinity
"/> to use.</param>
29
IList<NodeInfo> CreateNodes(NodeConfiguration configuration,
NodeAffinity
affinity, int numberOfNodesToCreate);
BackEnd\Components\Communications\NodeInfo.cs (4)
85
internal bool CanServiceRequestWithAffinity(
NodeAffinity
nodeAffinity)
89
NodeAffinity
.Any => true,
90
NodeAffinity
.InProc => _providerType == NodeProviderType.InProc,
91
NodeAffinity
.OutOfProc => _providerType != NodeProviderType.InProc,
BackEnd\Components\Communications\NodeManager.cs (6)
90
/// <param name="nodeAffinity">The <see cref="
NodeAffinity
"/> to use.</param>
93
public IList<NodeInfo> CreateNodes(NodeConfiguration configuration,
NodeAffinity
nodeAffinity, int numberOfNodesToCreate)
99
if ((nodeAffinity ==
NodeAffinity
.Any || nodeAffinity ==
NodeAffinity
.InProc) && !_componentHost!.BuildParameters.DisableInProcNode)
104
if (nodes.Count < numberOfNodesToCreate && (nodeAffinity ==
NodeAffinity
.Any || nodeAffinity ==
NodeAffinity
.OutOfProc))
BackEnd\Components\Communications\TaskHostNodeManager.cs (1)
48
public IList<NodeInfo> CreateNodes(NodeConfiguration configuration,
NodeAffinity
affinity, int numberOfNodesToCreate)
BackEnd\Components\Scheduler\Scheduler.cs (24)
1233
NodeAffinity
nodeAffinity = GetNodeAffinityForRequest(currentRequest);
1521
NodeAffinity
affinity = GetNodeAffinityForRequest(request.BuildRequest);
1568
NodeAffinity
affinityRequired = GetNodeAffinityForRequest(request.BuildRequest);
1572
case
NodeAffinity
.InProc:
1585
case
NodeAffinity
.OutOfProc:
1589
case
NodeAffinity
.Any:
1635
TraceScheduler($"Requesting creation of new node satisfying affinity {
NodeAffinity
.InProc}");
1636
responses.Add(ScheduleResponse.CreateNewNodeResponse(
NodeAffinity
.InProc, inProcNodesToCreate));
1666
TraceScheduler($"Requesting creation of {outOfProcNodesToCreate} new node(s) satisfying affinity {
NodeAffinity
.OutOfProc}");
1667
responses.Add(ScheduleResponse.CreateNewNodeResponse(
NodeAffinity
.OutOfProc, outOfProcNodesToCreate));
1797
NodeAffinity
requestAffinity = GetNodeAffinityForRequest(request);
1798
NodeAffinity
existingRequestAffinity =
NodeAffinity
.Any;
1799
if (requestAffinity !=
NodeAffinity
.Any)
1815
existingRequestAffinity = (_availableNodes[assignedNodeId].ProviderType == NodeProviderType.InProc) ?
NodeAffinity
.InProc :
NodeAffinity
.OutOfProc;
1826
if (existingRequestAffinity !=
NodeAffinity
.Any && existingRequestAffinity != requestAffinity)
2273
private
NodeAffinity
GetNodeAffinityForRequest(BuildRequest request)
2277
return
NodeAffinity
.OutOfProc;
2282
return
NodeAffinity
.InProc;
2291
return
NodeAffinity
.InProc;
2297
NodeAffinity
affinity =
NodeAffinity
.Any;
2306
if (affinity ==
NodeAffinity
.Any)
BackEnd\Components\Scheduler\ScheduleResponse.cs (3)
91
internal readonly
NodeAffinity
RequiredNodeType;
109
private ScheduleResponse(
NodeAffinity
affinity, int count)
224
public static ScheduleResponse CreateNewNodeResponse(
NodeAffinity
typeOfNodeToCreate, int count)
Instance\HostServices.cs (15)
59
private Dictionary<string,
NodeAffinity
> _projectAffinities;
141
bool hasExplicitOutOfProcAffinity = (GetNodeAffinity(projectFile, out isExplicit) ==
NodeAffinity
.OutOfProc) && isExplicit;
194
public
NodeAffinity
GetNodeAffinity(string projectFile)
206
/// <param name="nodeAffinity">The <see cref="
NodeAffinity
"/> to set.</param>
207
public void SetNodeAffinity(string projectFile,
NodeAffinity
nodeAffinity)
217
ErrorUtilities.VerifyThrowInvalidOperation(nodeAffinity ==
NodeAffinity
.InProc, "InvalidAffinityForProjectWithHostObject");
222
_projectAffinities = new Dictionary<string,
NodeAffinity
>(StringComparer.OrdinalIgnoreCase);
266
private
NodeAffinity
GetNodeAffinity(string projectFile, out bool isExplicit)
273
return
NodeAffinity
.InProc;
279
NodeAffinity
affinity;
293
return
NodeAffinity
.Any;
434
IDictionary<string,
NodeAffinity
> projectAffinities = _projectAffinities;
438
static (ITranslator t, ref
NodeAffinity
affinity) => t.TranslateEnum(ref affinity, (int)affinity),
439
static capacity => new Dictionary<string,
NodeAffinity
>(capacity, StringComparer.OrdinalIgnoreCase));
443
_projectAffinities = (Dictionary<string,
NodeAffinity
>)projectAffinities;