Michael Kublin has uploaded a new change for review.

Change subject: engine: Clean up of HandleVdsCpuFlagsOrClusterChangedCommand
......................................................................

engine: Clean up of HandleVdsCpuFlagsOrClusterChangedCommand

The following patch will perfrom:
1. Disable global transaction
2. Clean ups
3. Fixing typos at comments

Change-Id: I624d637bf8ff1020e7d477222e778481c20c3d73
Signed-off-by: Michael Kublin <mkub...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HandleVdsCpuFlagsOrClusterChangedCommand.java
1 file changed, 7 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/49/8649/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HandleVdsCpuFlagsOrClusterChangedCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HandleVdsCpuFlagsOrClusterChangedCommand.java
index d36ba03..56548b0 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HandleVdsCpuFlagsOrClusterChangedCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HandleVdsCpuFlagsOrClusterChangedCommand.java
@@ -17,10 +17,13 @@
 import org.ovirt.engine.core.dal.dbbroker.DbFacade;
 import org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector;
 import org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase;
-import org.ovirt.engine.core.utils.log.Log;
-import org.ovirt.engine.core.utils.log.LogFactory;
 
+@NonTransactiveCommandAttribute
 public class HandleVdsCpuFlagsOrClusterChangedCommand<T extends 
VdsActionParameters> extends VdsCommand<T> {
+
+    private boolean _hasFlags = true;
+    private static final long serialVersionUID = 8734106870574677571L;
+
     public HandleVdsCpuFlagsOrClusterChangedCommand(T parameters) {
         super(parameters);
     }
@@ -35,13 +38,11 @@
         return result;
     }
 
-    private boolean _hasFlags = true;
-
     @Override
     protected void executeCommand() {
         String vdsGroupCpuName = getVds().getvds_group_cpu_name();
         boolean foundCPU = true;
-        // if cluster doesnt have cpu then get the cpu from the vds
+        // if cluster doesn't have cpu then get the cpu from the vds
         if (StringUtils.isEmpty(vdsGroupCpuName)) {
             ServerCpu sc = 
CpuFlagsManagerHandler.FindMaxServerCpuByFlags(getVds().getcpu_flags(), getVds()
                     .getvds_group_compatibility_version());
@@ -87,7 +88,7 @@
             tempVar2.setSaveToDb(true);
             
Backend.getInstance().runInternalAction(VdcActionType.SetNonOperationalVds, 
tempVar2,  ExecutionHandler.createInternalJobContext());
         } else {
-            // if no need to change to non operational then dont log the 
command
+            // if no need to change to non operational then don't log the 
command
             setCommandShouldBeLogged(false);
         }
         setSucceeded(true);
@@ -98,6 +99,4 @@
         // check first if no flags and then if succeeded
         return (!_hasFlags) ? AuditLogType.VDS_CPU_RETRIEVE_FAILED : 
AuditLogType.VDS_CPU_LOWER_THAN_CLUSTER;
     }
-
-    private static Log log = 
LogFactory.getLog(HandleVdsCpuFlagsOrClusterChangedCommand.class);
 }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I624d637bf8ff1020e7d477222e778481c20c3d73
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Michael Kublin <mkub...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to