/** * Computes total quota allocations. * * @return Total allocated quota. * @throws StorageException if there was a problem fetching quotas from storage. */ public Metric computeQuotaAllocationTotals() throws StorageException { return storage.read( storeProvider -> { Metric allocation = new Metric(); for (IResourceAggregate quota : storeProvider.getQuotaStore().fetchQuotas().values()) { allocation.accumulate(quota); } return allocation; }); }
@Override protected void accumulate(ITaskConfig task) { if (type.filter.apply(task)) { super.accumulate(task); } }