/// <summary> /// Constructs a response where a result should be sent or execution should be resumed. /// </summary> /// <param name="node">The node ID to which the result should be sent.</param> /// <param name="unblocker">The result to send.</param> private ScheduleResponse(int node, BuildRequestUnblocker unblocker) { Action = (unblocker.Result == null) ? ScheduleActionType.ResumeExecution : ScheduleActionType.ReportResults; NodeId = node; Unblocker = unblocker; BuildResult = unblocker.Result; }
/// <summary> /// Constructs a response indicating there is a circular dependency caused by the specified request. /// </summary> private ScheduleResponse(int nodeId, BuildRequest parentRequest, BuildRequest requestCausingCircularDependency) { Action = ScheduleActionType.CircularDependency; BuildRequest = requestCausingCircularDependency; NodeId = nodeId; Unblocker = new BuildRequestUnblocker(parentRequest, new BuildResult(requestCausingCircularDependency, true /* circularDependency */)); }
/// <summary> /// Constructs a response where a request should be scheduled. /// </summary> /// <param name="node">The node ID to which the request should be sent.</param> /// <param name="request">The request to send.</param> private ScheduleResponse(int node, BuildRequest request, bool sendConfiguration) { Action = sendConfiguration ? ScheduleActionType.ScheduleWithConfiguration : ScheduleActionType.Schedule; NodeId = node; BuildRequest = request; }
/// <summary> /// Constructs a response indicating that a specific submission has completed. /// </summary> private ScheduleResponse(BuildResult result) { Action = ScheduleActionType.SubmissionComplete; BuildResult = result; }
/// <summary> /// Constructs a response indicating what type of node we need to create. /// </summary> private ScheduleResponse(NodeAffinity affinity, int count) { Action = ScheduleActionType.CreateNode; RequiredNodeType = affinity; NumberOfNodesToCreate = count; }
/// <summary> /// Constructs a response where no action should be taken. /// </summary> internal ScheduleResponse(ScheduleActionType type) { Action = type; }
/// <summary> /// Constructs a response where a request should be scheduled. /// </summary> /// <param name="node">The node ID to which the request should be sent.</param> /// <param name="request">The request to send.</param> /// <param name="sendConfiguration"><code>true</code> to send the configuration, otherwise <code>false</code>.</param> private ScheduleResponse(int node, BuildRequest request, bool sendConfiguration) { Action = sendConfiguration ? ScheduleActionType.ScheduleWithConfiguration : ScheduleActionType.Schedule; NodeId = node; BuildRequest = request; }