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)
88/// <param name="nodeAffinity">The <see cref="NodeAffinity"/> to use.</param> 91public IList<NodeInfo> CreateNodes(NodeConfiguration configuration, NodeAffinity nodeAffinity, int numberOfNodesToCreate) 97if ((nodeAffinity == NodeAffinity.Any || nodeAffinity == NodeAffinity.InProc) && !_componentHost!.BuildParameters.DisableInProcNode) 102if (nodes.Count < numberOfNodesToCreate && (nodeAffinity == NodeAffinity.Any || nodeAffinity == NodeAffinity.OutOfProc))
BackEnd\Components\Communications\TaskHostNodeManager.cs (1)
48public IList<NodeInfo> CreateNodes(NodeConfiguration configuration, NodeAffinity affinity, int numberOfNodesToCreate)
BackEnd\Components\Scheduler\Scheduler.cs (24)
1231NodeAffinity nodeAffinity = GetNodeAffinityForRequest(currentRequest); 1519NodeAffinity affinity = GetNodeAffinityForRequest(request.BuildRequest); 1566NodeAffinity affinityRequired = GetNodeAffinityForRequest(request.BuildRequest); 1570case NodeAffinity.InProc: 1583case NodeAffinity.OutOfProc: 1587case NodeAffinity.Any: 1633TraceScheduler($"Requesting creation of new node satisfying affinity {NodeAffinity.InProc}"); 1634responses.Add(ScheduleResponse.CreateNewNodeResponse(NodeAffinity.InProc, inProcNodesToCreate)); 1664TraceScheduler($"Requesting creation of {outOfProcNodesToCreate} new node(s) satisfying affinity {NodeAffinity.OutOfProc}"); 1665responses.Add(ScheduleResponse.CreateNewNodeResponse(NodeAffinity.OutOfProc, outOfProcNodesToCreate)); 1795NodeAffinity requestAffinity = GetNodeAffinityForRequest(request); 1796NodeAffinity existingRequestAffinity = NodeAffinity.Any; 1797if (requestAffinity != NodeAffinity.Any) 1813existingRequestAffinity = (_availableNodes[assignedNodeId].ProviderType == NodeProviderType.InProc) ? NodeAffinity.InProc : NodeAffinity.OutOfProc; 1824if (existingRequestAffinity != NodeAffinity.Any && existingRequestAffinity != requestAffinity) 2240private NodeAffinity GetNodeAffinityForRequest(BuildRequest request) 2244return NodeAffinity.OutOfProc; 2249return NodeAffinity.InProc; 2258return NodeAffinity.InProc; 2264NodeAffinity affinity = NodeAffinity.Any; 2273if (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;