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 <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[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

Reply via email to