Yair Zaslavsky has posted comments on this change.

Change subject: core: monitoring - Create a VM manager to co-ordinate 
monitoring and commands
......................................................................


Patch Set 8:

(3 comments)

http://gerrit.ovirt.org/#/c/28173/8//COMMIT_MSG
Commit Message:

Line 6: 
Line 7: core: monitoring - Create a VM manager to co-ordinate monitoring and
Line 8: commands
Line 9: 
Line 10: ** this patch is candidate for splitting up to several sub patches **
then please do :)
Line 11: 
Line 12: - Introduce VmManger state object
Line 13:   - responsible for getting dynamic,statistics and saving to db
Line 14:   - holds the last changed status


http://gerrit.ovirt.org/#/c/28173/8/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/DestroyVmVDSCommand.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/DestroyVmVDSCommand.java:

Line 14: import org.ovirt.engine.core.utils.transaction.TransactionMethod;
Line 15: import org.ovirt.engine.core.utils.transaction.TransactionSupport;
Line 16: import org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand;
Line 17: 
Line 18: public class DestroyVmVDSCommand<P extends 
DestroyVmVDSCommandParameters> extends ManagingVmCommand<P> {
here, for example, i would postpone that maybe to later patch?
Line 19:     public DestroyVmVDSCommand(P parameters) {
Line 20:         super(parameters);
Line 21:     }
Line 22: 


http://gerrit.ovirt.org/#/c/28173/8/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmManager.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmManager.java:

Line 13: import org.ovirt.engine.core.utils.transaction.TransactionSupport;
Line 14: 
Line 15: import java.util.concurrent.locks.ReentrantLock;
Line 16: 
Line 17: public class VmManager {
> I may use it but not on the class but rather at the lock level. or just use
Are you sure that the lock is the only thing that VmManager is going to release?
Mike suggested the autoclocasblelock.java in order to implement the "Guard" 
pattern (have a lock on a scope and at the end of the scope, the lock gets 
freed automatically) - if you want to use it here, then you should hve a 
getLock() method which returns you the auto closable lock, and not work with 
"lock" and "unlock" methods.
Line 18: 
Line 19:     private final Guid id;
Line 20:     private final ReentrantLock lock = new ReentrantLock();
Line 21: 


-- 
To view, visit http://gerrit.ovirt.org/28173
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54c6091a3996c23a4b70c7ef89412d34f1b58e34
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskri...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to