Allon Mureinik has posted comments on this change.
Change subject: core: Quota refactor - QuotaManager
......................................................................
Patch Set 20: Looks good to me, but someone else must approve
(2 inline comments)
minor issues, see inline
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
Line 27: public class QuotaManager {
Line 28: private final static QuotaManager INSTANCE = new QuotaManager();
Line 29: private final static ReentrantReadWriteLock lock = new
ReentrantReadWriteLock();
Line 30: private final static Log log =
LogFactory.getLog(QuotaManager.class);
Line 31: private static final HashMap<Guid, Map<Guid, Quota>>
storagePoolQuotaMap = new HashMap<Guid, Map<Guid, Quota>>();
all of these members should have private static final - don't mix orders
Line 32: private static final HashMap<Guid, Quota> directQuotaMap = new
HashMap<Guid, Quota>();
Line 33:
Line 34: // The logger is not final in order to allow mocking
Line 35: private static QuotaManagerAuditLogger quotaManagerAuditLogger =
new QuotaManagerAuditLogger();
Line 31: private static final HashMap<Guid, Map<Guid, Quota>>
storagePoolQuotaMap = new HashMap<Guid, Map<Guid, Quota>>();
Line 32: private static final HashMap<Guid, Quota> directQuotaMap = new
HashMap<Guid, Quota>();
Line 33:
Line 34: // The logger is not final in order to allow mocking
Line 35: private static QuotaManagerAuditLogger quotaManagerAuditLogger =
new QuotaManagerAuditLogger();
I would remove the setter, and have a public getter you could always spy.
Line 36:
Line 37: public static QuotaManager getInstance() {
Line 38: return INSTANCE;
Line 39: }
--
To view, visit http://gerrit.ovirt.org/8776
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibb100467a55b26e4219d1a2562da86b81ffdc032
Gerrit-PatchSet: 20
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Sharad Mishra <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: ofri masad <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches