Martin Mucha has posted comments on this change. Change subject: core: Added SerialMultipleActionsRunner ......................................................................
Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/35192/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SerialMultipleActionsRunner.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SerialMultipleActionsRunner.java: Line 27: } Line 28: } Line 29: Line 30: @Override Line 31: protected void runCommands() { > Moti - I assume by your suggestion you will have parrent command X that wil the idea is rather simple and moti touched it: not to have to write a loop in a <X>Command. I want to invoke N actions as a whole. If I do it in a loop, which I could, I'll get less readable caller code, where I have to treat everything manually like here. If I do it here, caller code will be simpler¹ and this code can be reused if possible in other commands as well. [1] I believe this is the right way also because caller code doesn't want to loop and stuff; It requires invocation these actions. It's not its Line 32: for (CommandBase<?> command : getCommands()) { Line 33: CorrelationIdTracker.setCorrelationId(command.getCorrelationId()); Line 34: command.canDoActionOnly(); Line 35: if (command.getReturnValue().getCanDoAction()) { -- To view, visit http://gerrit.ovirt.org/35192 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I460879f1dfd5f165e58049314d08dd45d8dbfc4a Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@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