Package com.vmware.aurora.composition.concurrent

Examples of com.vmware.aurora.composition.concurrent.ExecutionResult


      ExecutionResult[] result = new ExecutionResult[storedProcedures.length];
      for (int i = 0; i < result.length; i++) {
         VmOperation operation = getOperation(storedProcedures[i]);
         boolean flag = getFlag(operation);
         ExecutionResult r = null;
         if (flag) {
            r = new ExecutionResult(true, null);
            if (operation == VmOperation.CREATE_FOLDER) {
               CreateVMFolderSP sp = (CreateVMFolderSP)storedProcedures[i];
               setReturnFolder(sp);
            } else if (operation == VmOperation.CREATE_VM) {
               CreateVmSP sp = (CreateVmSP)storedProcedures[i];
               setReturnVM(sp);
            }
            r = new ExecutionResult(true, null);
         } else {
            r = new ExecutionResult(true, new Throwable("test failure"));
         }
         result[i] = r;
      }
      return result;
   }
View Full Code Here


      }
      VmOperation operation = getOperation(storedProcedures[0].first);
      boolean flag = getFlag(operation);
      Pair<ExecutionResult, ExecutionResult>[] result = new Pair[storedProcedures.length];
      for (int i = 0; i < result.length; i++) {
         ExecutionResult f = null;
         ExecutionResult s = null;
         if (flag) {
            if (operation == VmOperation.CREATE_VM) {
               CreateVmSP sp = (CreateVmSP)storedProcedures[i].first;
               setReturnVM(sp);
            }
            f = new ExecutionResult(true, null);
            s = new ExecutionResult(false, null);
         } else {
            f = new ExecutionResult(true, new Throwable("Mock failure"));
            s = new ExecutionResult(true, null);
         }
         result[i] = new Pair<ExecutionResult, ExecutionResult>(f, s);
      }
      return result;
View Full Code Here

TOP

Related Classes of com.vmware.aurora.composition.concurrent.ExecutionResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.