Moti Asayag has uploaded a new change for review. Change subject: engine: maintain camelCase ......................................................................
engine: maintain camelCase Change-Id: Ie90f2b66ca6e3af71ffcec1a8b83a4af99fe8617 Signed-off-by: Moti Asayag <masa...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinatorImpl.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandExecutor.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/interfaces/CommandCRUDOperations.java 3 files changed, 24 insertions(+), 24 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/97/38697/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinatorImpl.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinatorImpl.java index 4403c27..4e04715 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinatorImpl.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinatorImpl.java @@ -89,7 +89,7 @@ )) { buildCmdHierarchy(cmdEntity); if (!cmdEntity.isCallbackNotified()) { - cmdExecutor.addToCallBackMap(cmdEntity); + cmdExecutor.addToCallbackMap(cmdEntity); } } } @@ -125,7 +125,7 @@ return cmdEntity; } - public List<CommandEntity> getCommandsWithCallBackEnabled() { + public List<CommandEntity> getCommandsWithCallbackEnabled() { List<CommandEntity> cmdEntities = new ArrayList<>(); CommandEntity cmdEntity; for (Guid cmdId : commandsCache.keySet()) { @@ -237,7 +237,7 @@ synchronized(LOCK) { if (!childHierarchyInitialized) { childHierarchy.clear(); - for (CommandEntity cmd : getCommandsWithCallBackEnabled()) { + for (CommandEntity cmd : getCommandsWithCallbackEnabled()) { buildCmdHierarchy(cmd); } } diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandExecutor.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandExecutor.java index e88a7c2..32dafe3 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandExecutor.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandExecutor.java @@ -41,7 +41,7 @@ private static final Logger log = LoggerFactory.getLogger(CommandExecutor.class); private final CommandCoordinatorImpl coco; - private final Map<Guid, CommandCallback> cmdCallBackMap = new ConcurrentHashMap<>(); + private final Map<Guid, CommandCallback> cmdCallbackMap = new ConcurrentHashMap<>(); private boolean cmdExecutorInitialized; CommandExecutor(CommandCoordinatorImpl coco) { @@ -55,24 +55,24 @@ @OnTimerMethodAnnotation("invokeCallbackMethods") public void invokeCallbackMethods() { initCommandExecutor(); - Iterator<Entry<Guid, CommandCallback>> iterator = cmdCallBackMap.entrySet().iterator(); + Iterator<Entry<Guid, CommandCallback>> iterator = cmdCallbackMap.entrySet().iterator(); while (iterator.hasNext()) { Entry<Guid, CommandCallback> entry = iterator.next(); Guid cmdId = entry.getKey(); - CommandCallback callBack = entry.getValue(); + CommandCallback callback = entry.getValue(); CommandStatus status = coco.getCommandStatus(cmdId); boolean errorInCallback = false; try { switch (status) { case FAILED: - callBack.onFailed(cmdId, coco.getChildCommandIds(cmdId)); + callback.onFailed(cmdId, coco.getChildCommandIds(cmdId)); break; case SUCCEEDED: - callBack.onSucceeded(cmdId, coco.getChildCommandIds(cmdId)); + callback.onSucceeded(cmdId, coco.getChildCommandIds(cmdId)); break; case ACTIVE: if (coco.getCommandEntity(cmdId).isExecuted()) { - callBack.doPolling(cmdId, coco.getChildCommandIds(cmdId)); + callback.doPolling(cmdId, coco.getChildCommandIds(cmdId)); } break; default: @@ -92,7 +92,7 @@ private void handleError(Exception ex, CommandStatus status, Guid cmdId) { log.error("Error invoking callback method '{}' for '{}' command '{}'", - getCallBackMethod(status), + getCallbackMethod(status), status, cmdId); log.error("Exception", ex); @@ -101,7 +101,7 @@ } } - private String getCallBackMethod(CommandStatus status) { + private String getCallbackMethod(CommandStatus status) { switch (status) { case FAILED: case FAILED_RESTARTED: @@ -117,25 +117,25 @@ private void initCommandExecutor() { if (!cmdExecutorInitialized) { - for (CommandEntity cmdEntity : coco.getCommandsWithCallBackEnabled()) { + for (CommandEntity cmdEntity : coco.getCommandsWithCallbackEnabled()) { if (!cmdEntity.isExecuted() && cmdEntity.getCommandStatus() != CommandStatus.FAILED && cmdEntity.getCommandStatus() != CommandStatus.FAILED_RESTARTED) { coco.retrieveCommand(cmdEntity.getId()).setCommandStatus(CommandStatus.FAILED_RESTARTED); } if (!cmdEntity.isCallbackNotified()) { - addToCallBackMap(cmdEntity); + addToCallbackMap(cmdEntity); } } cmdExecutorInitialized = true; } } - public void addToCallBackMap(CommandEntity cmdEntity) { - if (!cmdCallBackMap.containsKey(cmdEntity.getId())) { + public void addToCallbackMap(CommandEntity cmdEntity) { + if (!cmdCallbackMap.containsKey(cmdEntity.getId())) { CommandBase<?> cmd = coco.retrieveCommand(cmdEntity.getId()); if (cmd != null && cmd.getCallback() != null) { - cmdCallBackMap.put(cmdEntity.getId(), cmd.getCallback()); + cmdCallbackMap.put(cmdEntity.getId(), cmd.getCallback()); } } } @@ -144,10 +144,10 @@ final VdcActionParametersBase parameters, final CommandContext cmdContext) { final CommandBase<?> command = CommandsFactory.createCommand(actionType, parameters, cmdContext); - CommandCallback callBack = command.getCallback(); - command.persistCommand(command.getParameters().getParentCommand(), cmdContext, callBack != null); - if (callBack != null) { - cmdCallBackMap.put(command.getCommandId(), callBack); + CommandCallback callback = command.getCallback(); + command.persistCommand(command.getParameters().getParentCommand(), cmdContext, callback != null); + if (callback != null) { + cmdCallbackMap.put(command.getCommandId(), callback); } Future<VdcReturnValueBase> retVal; try { @@ -168,11 +168,11 @@ } private VdcReturnValueBase executeCommand(final CommandBase<?> command, final CommandContext cmdContext) { - CommandCallback callBack = command.getCallback(); + CommandCallback callback = command.getCallback(); VdcReturnValueBase result = BackendUtils.getBackendCommandObjectsHandler(log).runAction(command, null); updateCommand(command, result); - if (callBack != null) { - callBack.executed(result); + if (callback != null) { + callback.executed(result); } return result; } diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/interfaces/CommandCRUDOperations.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/interfaces/CommandCRUDOperations.java index bda05b6..47c4927 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/interfaces/CommandCRUDOperations.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/interfaces/CommandCRUDOperations.java @@ -23,7 +23,7 @@ CommandStatus getCommandStatus(Guid commandId); - List<CommandEntity> getCommandsWithCallBackEnabled(); + List<CommandEntity> getCommandsWithCallbackEnabled(); void persistCommand(CommandEntity cmdEntity); -- To view, visit https://gerrit.ovirt.org/38697 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie90f2b66ca6e3af71ffcec1a8b83a4af99fe8617 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches