Alon Bar-Lev has posted comments on this change.

Change subject: core: introduce context pattern
......................................................................


Patch Set 34:

(1 comment)

http://gerrit.ovirt.org/#/c/28829/34/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/job/ExecutionHandler.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/job/ExecutionHandler.java:

Line 547:      *            The lock which should be released at child command
Line 548:      * @return A context by which the internal command should be 
monitored.
Line 549:      */
Line 550:     public static CommandContext 
createDefaultContextForTasks(CommandContext commandContext, EngineLock lock) {
Line 551:         return 
commandContext.duplicate().setLock(lock).resetCompensationContext();
> this is a mixture of POJO and build pattern.
I am unsure what the benefit in adding build to something that is that simple, 
what is the hybrid solution? we duplicate a context and set/override its 
properties, how can it be simpler? from example I've seen adding builder does 
not provide simplicity.
Line 552:     }
Line 553: 
Line 554:     public static void setExecutionContextForTasks(CommandContext 
commandContext, ExecutionContext executionContext, EngineLock lock) {
Line 555:         
commandContext.setExecutionContext(createDefaultContextForTasksImpl(executionContext))


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I310f5f77fff78b3232ee77fe63791425fd521516
Gerrit-PatchSet: 34
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@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