public void AddPredecessor(INodeDescription node) { if (!previous.Contains(node)) { previous.Add(node); } }
public TraceEventFactory(IExecutionContext executionContext, INodeDescription nodeContext) { this._jobName = executionContext.JobName; this._executionId = executionContext.ExecutionId; this._nodeName = nodeContext.NodeName; this._nodeContext = nodeContext; }
public void AddSuccessor(INodeDescription node) { if (!next.Contains(node)) { next.Add(node); } }
public NodeDescription(INodeDescription nodeContext) { this.NodeName = nodeContext.NodeName; this.TypeName = nodeContext.TypeName; this.PerformanceImpact = nodeContext.PerformanceImpact; this.MemoryFootPrint = nodeContext.MemoryFootPrint; }
/// <summary> /// Provide an array of INodeDescriptionsof the node provided by the node provider for the node. The index of the description /// is the node index to which the description matches /// </summary> /// <returns></returns> internal INodeDescription[] GetNodeDescriptions() { // The number of node descriptions is the number of nodes from all of the node providers, plus one for the default "0" node INodeDescription[] nodeDescription = new INodeDescription[nodeList.Count + 1]; nodeDescription[0] = null; for (int nodeListIndex = 0; nodeListIndex < nodeList.Count; nodeListIndex++) { ProvidersNodeInformation nodeInfo = nodeList[nodeListIndex]; // +1 because the node description already has the 0 element set to null nodeDescription[nodeListIndex + 1] = nodeInfo.Description; } return(nodeDescription); }
internal ProvidersNodeInformation ( int nodeProviderNodeIndex, int nodeId, INodeDescription nodeProviderDescription, INodeProvider nodeProviderReference ) { this.nodeIndex = nodeProviderNodeIndex; this.nodeId = nodeId; this.description = nodeProviderDescription; this.nodeProvider = nodeProviderReference; }
/// <summary> /// Provide an array of INodeDescriptionsof the node provided by the node provider for the node. The index of the description /// is the node index to which the description matches /// </summary> /// <returns></returns> internal INodeDescription[] GetNodeDescriptions() { // The number of node descriptions is the number of nodes from all of the node providers, plus one for the default "0" node INodeDescription[] nodeDescription = new INodeDescription[nodeList.Count+1]; nodeDescription[0] = null; for (int nodeListIndex = 0; nodeListIndex < nodeList.Count; nodeListIndex++) { ProvidersNodeInformation nodeInfo = nodeList[nodeListIndex]; // +1 because the node description already has the 0 element set to null nodeDescription[nodeListIndex + 1] = nodeInfo.Description; } return nodeDescription; }
/// <summary> /// Provide the scheduler with the information about the available nodes. This function has to be /// called after the NodeManager has initialzed all the node providers /// </summary> internal void Initialize(INodeDescription[] nodeDescriptions) { this.nodes = nodeDescriptions; this.childMode = false; this.handleIdToScheduleRecord = new Dictionary<ScheduleRecordKey, ScheduleRecord>(); this.scheduleTableLock = new object(); this.totalRequestsPerNode = new int[nodes.Length]; this.blockedRequestsPerNode = new int[nodes.Length]; this.postBlockCount = new int[nodes.Length]; for (int i = 0; i < totalRequestsPerNode.Length; i++) { totalRequestsPerNode[i] = 0; blockedRequestsPerNode[i] = 0; postBlockCount[i] = 0; } this.useLoadBalancing = (Environment.GetEnvironmentVariable("MSBUILDLOADBALANCE") != "0"); this.lastUsedNode = 0; }
public void AddNode <T>(INodeDescription nodeContext, IPushObservable <T> observable) => _nodes.Add(nodeContext);
public void AddNode <T>(INodeDescription nodeContext, IPushObservable <T> observable) => _tasksToWait.Add(observable.ToTaskAsync());
public void AddNode <T>(INodeDescription nodeContext, IPushObservable <T> observable) { _nodes.Add(nodeContext); _tasksToWait.Add(observable.ToEndAsync()); }