Michal Skrivanek has posted comments on this change. Change subject: events: vm stats refersher refactioring ......................................................................
Patch Set 3: (6 comments) https://gerrit.ovirt.org/#/c/37487/3//COMMIT_MSG Commit Message: Line 3: AuthorDate: 2015-03-27 15:18:29 +0100 Line 4: Commit: pkliczewski <[email protected]> Line 5: CommitDate: 2015-03-30 17:16:04 +0200 Line 6: Line 7: events: vm stats refersher refactioring s/refactioring/refactoring/ Line 8: Line 9: Line 10: Change-Id: I40139f9c90bd9ceeb297adf9f8bd3ab7f9113930 https://gerrit.ovirt.org/#/c/37487/3/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java: Line 83: private boolean mBeforeFirstRefresh = true; Line 84: private HostMonitoring hostMonitoring; Line 85: private boolean monitoringNeeded; Line 86: private List<Pair<VM, VmInternalData>> lastVmsList = Collections.emptyList(); Line 87: private VMStatsRefresher refresher; I'd call it vmsRefresher or something like that Line 88: Line 89: public VdsManager(VDS vds, AuditLogDirector auditLogDirector) { Line 90: this.auditLogDirector = auditLogDirector; Line 91: log.info("Entered VdsManager constructor"); Line 175: return; Line 176: } Line 177: Line 178: try { Line 179: this.refresher.update(); here aslo more verbosity would be better, updateIteration()? Line 180: if (isMonitoringNeeded()) { Line 181: setStartTime(); Line 182: hostMonitoring = new HostMonitoring(VdsManager.this, cachedVds, monitoringStrategy); Line 183: hostMonitoring.refresh(); Line 243: setMonitoringNeeded(); Line 244: } Line 245: Line 246: @OnTimerMethodAnnotation("vmsMonitoring") Line 247: public void vmsMonitoring() { can't we move it into the refresher too? Why don't have @OnTimerMethodAnnotation at perform Line 248: this.refresher.perform(); Line 249: } Line 250: Line 251: /** Line 897: } Line 898: } Line 899: } Line 900: Line 901: public boolean getRefreshStatistics() { since this is called from Host monitoring, better check on NULL? Line 902: return this.refresher.getRefreshStatistics(); Line 903: } Line 904: Line 905: public Object getLockObj() { Line 898: } Line 899: } Line 900: Line 901: public boolean getRefreshStatistics() { Line 902: return this.refresher.getRefreshStatistics(); also, this should be refactored and eliminated for EventsRefresher, then I wouldn't inherit EventsRefresher form PollingRefresher Line 903: } Line 904: Line 905: public Object getLockObj() { Line 906: return lockObj; -- To view, visit https://gerrit.ovirt.org/37487 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40139f9c90bd9ceeb297adf9f8bd3ab7f9113930 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Arik Hadas <[email protected]> Gerrit-Reviewer: Barak Azulay <[email protected]> Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: Omer Frenkel <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Roy Golan <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
