internal AppealCase Dequeue() { if (_decisionQueue.Count > 0) { return(_decisionQueue.Dequeue()); } return(_summonsQueue.Dequeue()); }
private void _processIncomingCases() { while (_incomingCases.Count > 0) { AppealCase appealCase = _incomingCases.Dequeue(); Allocation allocation = _allocate(appealCase); Member firstWorker = allocation.Enqueue(appealCase); _activeCases[appealCase] = allocation; } }
private void _processCirculatingCases() { while (_circulatingCases.Count > 0) { AppealCase appealCase = _circulatingCases.Dequeue(); Allocation allocation = _activeCases[appealCase]; Member nextWorker = allocation.Enqueue(appealCase); if (nextWorker == null) { appealCase.AdvanceState(); Hour opStartHour = _scheduleOP(appealCase); Hour opEndHour = opStartHour.Add(OPDURATION); allocation.NotifyOPSchedule(appealCase, opStartHour, opEndHour); } } }