Ravi Nori has posted comments on this change.

Change subject: engine : Tunnel calls to AsyncTaskManager and introduce CoCo
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/26332/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinator.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinator.java:

Line 31: 
Line 32:     private static final CommandCoordinator instance = new 
CommandCoordinator();
Line 33:     private static final Log log = 
LogFactory.getLog(CommandCoordinator.class);
Line 34: 
Line 35:     public static CommandCoordinator getInstance() {
> Another option to consider is in CommandsFactory create a single instance o
CommandCoordinator is first instantiated when we call 
TaskManagerUtil.initAsyncTaskManager(); from InitBackendServicesOnStartupBean. 
TaskManagerUtil calls 
AsyncTaskManager.getInstance(CommandCoordinatorImpl.getInstance()).initAsyncTaskManager()

This is the first call to CommandCoordinatorImpl.getInstance()

Commands don't call methods on CommandCoordinator but call TaskManagerUtil 
which calls CommandCoordinator. 

So if I inject Coco into commands. the calls would look like this in CommandBase

TaskManagerUtil.createTask(coco, ....


Please let me know if this is what you had in mind
Line 36:         return instance;
Line 37:     }
Line 38: 
Line 39:     private CommandCoordinator() {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic075b65ebc2dcd067c3fe514fe03dbb719b54e94
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@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