public CapacitySummary GetCapacitySummary(DirectoryIdentity objectIdentity, bool refreshData)
        {
            Func <ILoadBalanceService, HeatMapCapacityData> func = (ILoadBalanceService service) => service.GetCapacitySummary(objectIdentity, refreshData);
            HeatMapCapacityData capacityDatum = this.CallClientFunction <HeatMapCapacityData>(func);

            return(CapacitySummary.FromDatum(capacityDatum));
        }
Beispiel #2
0
        public ICapacityProjection GetCapacityProjection(ByteQuantifiedSize averageMailboxSize)
        {
            HeatMapCapacityData         heatMapData                 = this.HeatMap.ToCapacityData();
            CapacityProjectionData      capacityProjectionData      = CapacityProjectionData.FromSettings(this.Settings);
            AvailableCapacityProjection availableCapacityProjection = new AvailableCapacityProjection(heatMapData, capacityProjectionData, this.Settings.QueryBufferPeriodDays, averageMailboxSize, base.Logger);
            ConsumerSizeProjection      consumerSizeProjection      = new ConsumerSizeProjection(heatMapData, capacityProjectionData, averageMailboxSize, this.Settings.QueryBufferPeriodDays, (double)this.Settings.MaximumConsumerMailboxSizePercent / 100.0, base.Logger);

            return(new MinimumCapacityProjection(base.Logger, new ICapacityProjection[]
            {
                consumerSizeProjection,
                availableCapacityProjection
            }));
        }
        internal static CapacitySummary FromDatum(HeatMapCapacityData capacityDatum)
        {
            CapacitySummary capacitySummary = new CapacitySummary();

            capacitySummary.SetExchangeVersion(ExchangeObjectVersion.Current);
            capacitySummary.Identity           = capacityDatum.Identity.Name;
            capacitySummary.PhysicalSize       = capacityDatum.PhysicalSize;
            capacitySummary.LogicalSize        = capacityDatum.LogicalSize;
            capacitySummary.MaximumSize        = capacityDatum.TotalCapacity;
            capacitySummary.TotalMailboxCount  = capacityDatum.TotalMailboxCount;
            capacitySummary.RetrievedTimeStamp = capacityDatum.RetrievedTimestamp;
            Report.ListWithToString <LoadMetricValue> listWithToString = new Report.ListWithToString <LoadMetricValue>();
            foreach (LoadMetric loadMetric in capacityDatum.LoadMetrics.Metrics)
            {
                LoadMetricValue item = new LoadMetricValue(loadMetric, capacityDatum.LoadMetrics[loadMetric]);
                listWithToString.Add(item);
            }
            capacitySummary.LoadMetrics = listWithToString;
            return(capacitySummary);
        }
Beispiel #4
0
        public HeatMapCapacityData ToCapacityData()
        {
            DirectoryIdentity directoryObjectIdentity = base.DirectoryObjectIdentity;
            long aggregateConsumedLoad = this.GetAggregateConsumedLoad(ConsumerMailboxSize.Instance);
            long value = this.GetAggregateConsumedLoad(PhysicalSize.Instance) - aggregateConsumedLoad;
            long aggregateMaximumLoad               = this.GetAggregateMaximumLoad(PhysicalSize.Instance);
            long aggregateConsumedLoad2             = this.GetAggregateConsumedLoad(LogicalSize.Instance);
            long aggregateConsumedLoad3             = this.GetAggregateConsumedLoad(ConsumerMailboxCount.Instance);
            HeatMapCapacityData heatMapCapacityData = new HeatMapCapacityData();

            heatMapCapacityData.TotalCapacity      = PhysicalSize.Instance.ToByteQuantifiedSize(aggregateMaximumLoad);
            heatMapCapacityData.ConsumerSize       = ConsumerMailboxSize.Instance.ToByteQuantifiedSize(aggregateConsumedLoad);
            heatMapCapacityData.OrganizationSize   = PhysicalSize.Instance.ToByteQuantifiedSize(value);
            heatMapCapacityData.LogicalSize        = LogicalSize.Instance.ToByteQuantifiedSize(aggregateConsumedLoad2);
            heatMapCapacityData.Identity           = directoryObjectIdentity;
            heatMapCapacityData.TotalMailboxCount  = aggregateConsumedLoad3;
            heatMapCapacityData.RetrievedTimestamp = this.DataRetrievedTimestampUtc;
            heatMapCapacityData.LoadMetrics        = new LoadMetricStorage();
            foreach (LoadMetric metric in base.ConsumedLoad.Metrics)
            {
                heatMapCapacityData.LoadMetrics[metric] = this.GetAggregateConsumedLoad(metric);
            }
            return(heatMapCapacityData);
        }