51 references to NodeAffinity
Microsoft.Build (51)
BackEnd\Components\Communications\INodeManager.cs (2)
23/// <param name="affinity">The <see cref="NodeAffinity"/> to use.</param> 29IList<NodeInfo> CreateNodes(NodeConfiguration configuration, NodeAffinity affinity, int numberOfNodesToCreate);
BackEnd\Components\Communications\NodeInfo.cs (4)
85internal bool CanServiceRequestWithAffinity(NodeAffinity nodeAffinity) 89NodeAffinity.Any => true, 90NodeAffinity.InProc => _providerType == NodeProviderType.InProc, 91NodeAffinity.OutOfProc => _providerType != NodeProviderType.InProc,
BackEnd\Components\Communications\NodeManager.cs (6)
89/// <param name="nodeAffinity">The <see cref="NodeAffinity"/> to use.</param> 92public IList<NodeInfo> CreateNodes(NodeConfiguration configuration, NodeAffinity nodeAffinity, int numberOfNodesToCreate) 98if ((nodeAffinity == NodeAffinity.Any || nodeAffinity == NodeAffinity.InProc) && !_componentHost!.BuildParameters.DisableInProcNode) 103if (nodes.Count < numberOfNodesToCreate && (nodeAffinity == NodeAffinity.Any || nodeAffinity == NodeAffinity.OutOfProc))
BackEnd\Components\Communications\TaskHostNodeManager.cs (1)
49public IList<NodeInfo> CreateNodes(NodeConfiguration configuration, NodeAffinity affinity, int numberOfNodesToCreate)
BackEnd\Components\Scheduler\Scheduler.cs (24)
1231NodeAffinity nodeAffinity = GetNodeAffinityForRequest(currentRequest); 1521NodeAffinity affinity = GetNodeAffinityForRequest(request.BuildRequest); 1568NodeAffinity affinityRequired = GetNodeAffinityForRequest(request.BuildRequest); 1572case NodeAffinity.InProc: 1585case NodeAffinity.OutOfProc: 1589case NodeAffinity.Any: 1635TraceScheduler($"Requesting creation of new node satisfying affinity {NodeAffinity.InProc}"); 1636responses.Add(ScheduleResponse.CreateNewNodeResponse(NodeAffinity.InProc, inProcNodesToCreate)); 1666TraceScheduler($"Requesting creation of {outOfProcNodesToCreate} new node(s) satisfying affinity {NodeAffinity.OutOfProc}"); 1667responses.Add(ScheduleResponse.CreateNewNodeResponse(NodeAffinity.OutOfProc, outOfProcNodesToCreate)); 1797NodeAffinity requestAffinity = GetNodeAffinityForRequest(request); 1798NodeAffinity existingRequestAffinity = NodeAffinity.Any; 1799if (requestAffinity != NodeAffinity.Any) 1815existingRequestAffinity = (_availableNodes[assignedNodeId].ProviderType == NodeProviderType.InProc) ? NodeAffinity.InProc : NodeAffinity.OutOfProc; 1826if (existingRequestAffinity != NodeAffinity.Any && existingRequestAffinity != requestAffinity) 2246private NodeAffinity GetNodeAffinityForRequest(BuildRequest request) 2250return NodeAffinity.OutOfProc; 2255return NodeAffinity.InProc; 2264return NodeAffinity.InProc; 2270NodeAffinity affinity = NodeAffinity.Any; 2279if (affinity == NodeAffinity.Any)
BackEnd\Components\Scheduler\ScheduleResponse.cs (3)
91internal readonly NodeAffinity RequiredNodeType; 109private ScheduleResponse(NodeAffinity affinity, int count) 224public static ScheduleResponse CreateNewNodeResponse(NodeAffinity typeOfNodeToCreate, int count)
Instance\HostServices.cs (11)
58private Dictionary<string, NodeAffinity> _projectAffinities; 140bool hasExplicitOutOfProcAffinity = (GetNodeAffinity(projectFile, out isExplicit) == NodeAffinity.OutOfProc) && isExplicit; 193public NodeAffinity GetNodeAffinity(string projectFile) 205/// <param name="nodeAffinity">The <see cref="NodeAffinity"/> to set.</param> 206public void SetNodeAffinity(string projectFile, NodeAffinity nodeAffinity) 216ErrorUtilities.VerifyThrowInvalidOperation(nodeAffinity == NodeAffinity.InProc, "InvalidAffinityForProjectWithHostObject"); 221_projectAffinities = new Dictionary<string, NodeAffinity>(StringComparer.OrdinalIgnoreCase); 265private NodeAffinity GetNodeAffinity(string projectFile, out bool isExplicit) 272return NodeAffinity.InProc; 278NodeAffinity affinity; 292return NodeAffinity.Any;