Mike Kolesnik has posted comments on this change.
Change subject: DO NOT SUBMIT core: New mechanism in CommandBase (rollback
using command)
......................................................................
Patch Set 7: (8 inline comments)
Please run formatter on new code.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
Line 147: protected VdcReturnValueBase
runInternalCommandOnRollback(VdcActionType commandType, VdcActionParametersBase
params, CommandContext ctx) {
If CommandExecutionReason is a parameter value, why have this method? You can
just set it and call the regular method.
Line 174: protected VdcReturnValueBase
checkAndPerformRollbackUsingCommand(VdcActionType commandType,
IMHO Not necessary to call it "checkAndPerform.."
A better name might be "attemptRollback(..."
Command is a parameter anyway, so it's pretty clear that it is used for the
rollback.
Line 176: CommandContext context) {
This could be written as:
{
if (canPerformRollbackUsingCommand(commandType, params)) {
return runInternalCommandOnRollback(commandType, params, context);
}
return new VdcReturnValueBase(false);
}
Line 211: return true;
Why always return true?
If there is reason for this, please document in javadoc
Line 269: adjustExecutionReason();
Maybe "determine" is a more suitable verb?
Line 1048: protected void startPollingAsyncTasks(Collection<Guid> taskIds) {
Why is this method needed?
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/CommandExecutionReason.java
Line 6: public enum CommandExecutionReason {
Since this enum is tightly coupled with the parameters/command won't it make
sense to put as inner class?
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionParametersBase.java
Line 28: private transient CommandExecutionReason executionReason = null;
Why not init by default to REGULAR_FLOW?
--
To view, visit http://gerrit.ovirt.org/2374
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic734d785215de855817acf77c88cba9047b959eb
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches