Beispiel #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public SchedulableRequest(SchedulingData collection, BuildRequest request, SchedulableRequest parent)
        {
            ErrorUtilities.VerifyThrowArgumentNull(collection, "collection");
            ErrorUtilities.VerifyThrowArgumentNull(request, "request");
            ErrorUtilities.VerifyThrow((parent == null) || (parent._schedulingData == collection), "Parent request does not belong to the same collection.");

            _schedulingData         = collection;
            _request                = request;
            _parent                 = parent;
            _assignedNodeId         = -1;
            _requestsWeAreBlockedBy = new Dictionary <BlockingRequestKey, SchedulableRequest>();
            _requestsWeAreBlocking  = new HashSet <SchedulableRequest>();

            _timeRecords = new Dictionary <SchedulableRequestState, ScheduleTimeRecord>(5);
            _timeRecords[SchedulableRequestState.Unscheduled] = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Blocked]     = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Yielding]    = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Executing]   = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Ready]       = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Completed]   = new ScheduleTimeRecord();

            ChangeToState(SchedulableRequestState.Unscheduled);
        }
Beispiel #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public SchedulingPlan(IConfigCache configCache, SchedulingData schedulingData)
 {
     _configCache                = configCache;
     _schedulingData             = schedulingData;
     this.MaximumConfigurationId = BuildRequestConfiguration.InvalidConfigurationId;
 }