public CapacitySchedulerInfo(CSQueue parent) { // JAXB needs this this.queueName = parent.GetQueueName(); this.usedCapacity = parent.GetUsedCapacity() * 100; this.capacity = parent.GetCapacity() * 100; float max = parent.GetMaximumCapacity(); if (max < Epsilon || max > 1f) { max = 1f; } this.maxCapacity = max * 100; queues = GetQueues(parent); }
protected internal virtual CapacitySchedulerQueueInfoList GetQueues(CSQueue parent ) { CSQueue parentQueue = parent; CapacitySchedulerQueueInfoList queuesInfo = new CapacitySchedulerQueueInfoList(); foreach (CSQueue queue in parentQueue.GetChildQueues()) { CapacitySchedulerQueueInfo info; if (queue is LeafQueue) { info = new CapacitySchedulerLeafQueueInfo((LeafQueue)queue); } else { info = new CapacitySchedulerQueueInfo(queue); info.queues = GetQueues(queue); } queuesInfo.AddToQueueInfoList(info); } return(queuesInfo); }