Yair Zaslavsky has posted comments on this change. Change subject: engine : Modify Async_tasks table to use CommandEntity ......................................................................
Patch Set 14: (2 comments) http://gerrit.ovirt.org/#/c/26687/14/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinatorImpl.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinatorImpl.java: Line 136: public void updateCommandStatus(final Guid commandId, final AsyncTaskType taskType, final CommandStatus status) { Line 137: commandsCache.updateCommandStatus(commandId, taskType, status); Line 138: } Line 139: Line 140: public List<AsyncTasks> getAllAsyncTasksFromDb() { > All this will disappear into Async tasks CommandCallBack in the future. sure, as i said, just a thought, as long as CocoImpl will be relatively clean i am fine. Line 141: List<AsyncTasks> asyncTasks = DbFacade.getInstance().getAsyncTaskDao().getAll(); Line 142: for (AsyncTasks asyncTask : asyncTasks) { Line 143: copyFromCommandEntity(asyncTask, commandsCache.get(asyncTask.getCommandId())); Line 144: } http://gerrit.ovirt.org/#/c/26687/14/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandsCacheImpl.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandsCacheImpl.java: Line 21: public CommandsCacheImpl() { Line 22: commandMap = CacheProviderFactory.<Guid, CommandEntity> getCacheWrapper(COMMAND_MAP_NAME); Line 23: } Line 24: Line 25: public void initializeCache() { > I can change it to private, did not want to go to DB in CTOR. Lazy initiali ok, i am fine with that. Line 26: if (!cacheInitialized) { Line 27: synchronized(LOCK) { Line 28: if (!cacheInitialized) { Line 29: List<CommandEntity> cmdEntities = DbFacade.getInstance().getCommandEntityDao().getAll(); -- To view, visit http://gerrit.ovirt.org/26687 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ied038b514f1285b4d46deff022beafd9dcfe5c29 Gerrit-PatchSet: 14 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: Sandro Bonazzola <sbona...@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