ofri masad has posted comments on this change.
Change subject: core: Quota Monitors - backend
......................................................................
Patch Set 1: (5 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetQuotasByAdElementIdQuery.java
Line 12: public class GetQuotasByAdElementIdQuery<P extends
GetQuotasByAdElementIdQueryParameters> extends QueriesCommandBase<P> {
Line 13: public GetQuotasByAdElementIdQuery(P parameters) {
Line 14: super(parameters);
Line 15: }
Line 16:
Done
Line 17: @Override
Line 18: protected void executeQueryCommand() {
Line 19: if (getParameters().isIncludeUsageData()) {
Line 20: List<Guid> ids = new ArrayList<Guid>();
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
Line 745: return quota;
Line 746: }
Line 747:
Line 748: /**
Line 749: * REturn a list of QuotaPerUserUsageEntity representing the
status of all the quotas in quotaIdsList
Done
Line 750: *
Line 751: * @param quotaList
Line 752: * quota list
Line 753: * @return - list of QuotaPerUserUsageEntity
Line 752: * quota list
Line 753: * @return - list of QuotaPerUserUsageEntity
Line 754: */
Line 755: public void updateUsage(List<Quota> quotaList) {
Line 756: lock.writeLock().lock();
Done
Line 757: try {
Line 758: for (Quota quotaExternal : quotaList) {
Line 759: Quota quota = null;
Line 760: // look for the quota in the cache
Line 830: */
Line 831: public List<QuotaPerUserUsageEntity>
getPerUserUsageReport(List<Quota> quotaIdsList, List<VM> vms) {
Line 832: Map<Guid, QuotaPerUserUsageEntity> quotaPerUserUsageEntityMap
= new HashMap<Guid, QuotaPerUserUsageEntity>();
Line 833:
Line 834: lock.writeLock().lock();
Done
Line 835: try {
Line 836: for (Quota externalQuota : quotaIdsList) {
Line 837: Guid quotaId = externalQuota.getId();
Line 838: Quota quota = null;
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SearchQuery.java
Line 252: return genericSearch(getDbFacade().getStorageDomainDao(),
true, null);
Line 253: }
Line 254:
Line 255: private List<Quota> searchQuota() {
Line 256: List<Quota> quotaList =
genericSearch(getDbFacade().getQuotaDao(), true, null);
Done
Line 257: QuotaManager.getInstance().updateUsage(quotaList);
Line 258: return quotaList;
Line 259: }
Line 260:
--
To view, visit http://gerrit.ovirt.org/10120
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I67770aefec191832d0c5bb69fbaba82cd0e6febb
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: ofri masad <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches