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 <oma...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com> Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com> Gerrit-Reviewer: Sharad Mishra <snmis...@linux.vnet.ibm.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: ofri masad <oma...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches