test_class.declarator: hypervisorGenerator
test_class.modifier: private
test_class.original_string: private HypervisorGenerator hypervisorGenerator;
test_class.type: HypervisorGenerator
test_class.var_name: hypervisorGenerator
test_class.file: model/src/test/java/com/abiquo/server/core/infrastructure/MachineDAOTest.java
test_class.identifier: MachineDAOTest
test_class.superclass: extends DefaultDAOTestBase<MachineDAO, Machine>
test_case.body: @Test
      public void test_deleteRackMachines()
      {
          MachineGenerator machineGenerator = new MachineGenerator(getSeed());
  
          Datacenter datacenter = new Datacenter("Datacenter name", "Datacenter location");
          Rack rack1 = datacenter.createRack("Rack 1", 2, 4094, 2, 10);
          Rack rack2 = datacenter.createRack("Rack 2", 2, 4094, 2, 10);
          Machine machine1_1 = machineGenerator.createMachine(datacenter);
          machine1_1.setRack(rack1);
          Machine machine2_1 = machineGenerator.createMachine(datacenter);
          machine2_1.setRack(rack2);
          Machine machine2_2 = machineGenerator.createMachine(datacenter);
          machine2_2.setRack(rack2);
          Machine machine3 = machineGenerator.createMachine(datacenter);
  
          ds().persistAll(datacenter, rack1, rack2, machine1_1, machine2_1, machine2_2, machine3);
  
          MachineDAO dao = createDaoForReadWriteTransaction();
          Assert.assertEquals(dao.deleteRackMachines(reload(dao, rack1)), 1);
          EntityManagerHelper.commitAndClose(dao.getEntityManager());
  
          Assert.assertFalse(ds().canFind(machine1_1));
          Assert.assertTrue(ds().canFind(machine2_1));
          Assert.assertTrue(ds().canFind(machine2_2));
          Assert.assertTrue(ds().canFind(machine3));
  
          dao = createDaoForReadWriteTransaction();
          Assert.assertEquals(dao.deleteRackMachines(reload(dao, rack2)), 2);
          EntityManagerHelper.commitAndClose(dao.getEntityManager());
          Assert.assertFalse(ds().canFind(machine1_1));
          Assert.assertFalse(ds().canFind(machine2_1));
          Assert.assertFalse(ds().canFind(machine2_2));
          Assert.assertTrue(ds().canFind(machine3));
      }
test_case.class_method_signature: MachineDAOTest.test_deleteRackMachines()
test_case.full_signature: @Test public void test_deleteRackMachines()
test_case.identifier: test_deleteRackMachines
test_case.invocations: getSeed createRack createRack createMachine setRack createMachine setRack createMachine setRack createMachine persistAll ds createDaoForReadWriteTransaction assertEquals deleteRackMachines reload commitAndClose getEntityManager assertFalse canFind ds assertTrue canFind ds assertTrue canFind ds assertTrue canFind ds createDaoForReadWriteTransaction assertEquals deleteRackMachines reload commitAndClose getEntityManager assertFalse canFind ds assertFalse canFind ds assertFalse canFind ds assertTrue canFind ds
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_deleteRackMachines()
focal_class.declarator: WHY_QUERY_CANDIDATE_SAME_VDC_RACK_AND_TYPE = //
          "SELECT m.id FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack " + //
              "AND m.enterprise is null"
focal_class.modifier: private final static
focal_class.original_string: private final static String WHY_QUERY_CANDIDATE_SAME_VDC_RACK_AND_TYPE = //
          "SELECT m.id FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack " + //
              "AND m.enterprise is null";
focal_class.type: String
focal_class.var_name: WHY_QUERY_CANDIDATE_SAME_VDC_RACK_AND_TYPE
focal_class.declarator: WHT_QUERY_CANDIDATE_SAME_VDC_RACK_AND_TYPE_AND_STATE = //
          "SELECT m.id FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack " + //
              "AND m.state = :state " + //
              "AND m.enterprise is null"
focal_class.modifier: private final static
focal_class.original_string: private final static String WHT_QUERY_CANDIDATE_SAME_VDC_RACK_AND_TYPE_AND_STATE = //
          "SELECT m.id FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack " + //
              "AND m.state = :state " + //
              "AND m.enterprise is null";
focal_class.type: String
focal_class.var_name: WHT_QUERY_CANDIDATE_SAME_VDC_RACK_AND_TYPE_AND_STATE
focal_class.declarator: WHY_QUERY_CANDIDATE_SAME_VDC_RACK_AND_TYPE_AND_RESERVED = //
          "SELECT m.id FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE m.id in (:reserveds) AND " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack "
focal_class.modifier: private final static
focal_class.original_string: private final static String WHY_QUERY_CANDIDATE_SAME_VDC_RACK_AND_TYPE_AND_RESERVED = //
          "SELECT m.id FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE m.id in (:reserveds) AND " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack ";
focal_class.type: String
focal_class.var_name: WHY_QUERY_CANDIDATE_SAME_VDC_RACK_AND_TYPE_AND_RESERVED
focal_class.declarator: QUERY_CANDIDATE_NO_ENTERPRISE_EXCLUDED = //
          "SELECT DISTINCT vm.hypervisor.machine.id "
              + //
              "FROM com.abiquo.server.core.cloud.VirtualMachine vm WHERE "
              + //
              "   (vm.enterprise.id IN "
              + "      ( SELECT rule.enterprise2.id FROM com.abiquo.server.core.scheduler.EnterpriseExclusionRule rule WHERE rule.enterprise1.id = :enterpriseId )"
              + "   ) OR "
              + "   (vm.enterprise.id IN "
              + "      ( SELECT rule.enterprise1.id FROM com.abiquo.server.core.scheduler.EnterpriseExclusionRule rule WHERE rule.enterprise2.id = :enterpriseId )"
              + "   ) "
              + //
              "   OR " // enterprise doesn't have exlusion rules
              + //
              "   (vm.enterprise.id IN "
              + "      ( SELECT rule.enterprise1.id FROM com.abiquo.server.core.scheduler.EnterpriseExclusionRule rule WHERE rule.enterprise2.id = :enterpriseId )"
              + "   ) "
focal_class.modifier: private final static
focal_class.original_string: private final static String QUERY_CANDIDATE_NO_ENTERPRISE_EXCLUDED = //
          "SELECT DISTINCT vm.hypervisor.machine.id "
              + //
              "FROM com.abiquo.server.core.cloud.VirtualMachine vm WHERE "
              + //
              "   (vm.enterprise.id IN "
              + "      ( SELECT rule.enterprise2.id FROM com.abiquo.server.core.scheduler.EnterpriseExclusionRule rule WHERE rule.enterprise1.id = :enterpriseId )"
              + "   ) OR "
              + "   (vm.enterprise.id IN "
              + "      ( SELECT rule.enterprise1.id FROM com.abiquo.server.core.scheduler.EnterpriseExclusionRule rule WHERE rule.enterprise2.id = :enterpriseId )"
              + "   ) "
              + //
              "   OR " // enterprise doesn't have exlusion rules
              + //
              "   (vm.enterprise.id IN "
              + "      ( SELECT rule.enterprise1.id FROM com.abiquo.server.core.scheduler.EnterpriseExclusionRule rule WHERE rule.enterprise2.id = :enterpriseId )"
              + "   ) ";
focal_class.type: String
focal_class.var_name: QUERY_CANDIDATE_NO_ENTERPRISE_EXCLUDED
focal_class.declarator: QUERY_CANDIDATE_MACHINES = //
          "SELECT m FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack " + //
              "AND m.state = :state " + //
              "AND (m.enterprise is null OR m.enterprise.id = :enterpriseId) "
focal_class.modifier: private final static
focal_class.original_string: private final static String QUERY_CANDIDATE_MACHINES = //
          "SELECT m FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack " + //
              "AND m.state = :state " + //
              "AND (m.enterprise is null OR m.enterprise.id = :enterpriseId) ";
focal_class.type: String
focal_class.var_name: QUERY_CANDIDATE_MACHINES
focal_class.declarator: QUERY_CANDIDATE_MACHINES_HA_EXCLUDE_ORIGINAL = //
          "SELECT m FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack " + //
              "AND m.state = :state " + //
              "AND (m.enterprise is null OR m.enterprise.id = :enterpriseId) " + //
              "AND m.hypervisor.id <> :originalHypervisorId"
focal_class.modifier: private final static
focal_class.original_string: private final static String QUERY_CANDIDATE_MACHINES_HA_EXCLUDE_ORIGINAL = //
          "SELECT m FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack " + //
              "AND m.state = :state " + //
              "AND (m.enterprise is null OR m.enterprise.id = :enterpriseId) " + //
              "AND m.hypervisor.id <> :originalHypervisorId";
focal_class.type: String
focal_class.var_name: QUERY_CANDIDATE_MACHINES_HA_EXCLUDE_ORIGINAL
focal_class.declarator: QUERY_CANDIDATE_MACHINES_RESERVED = //
          "SELECT m FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE m.id in (:reserveds) AND " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack " + //
              "AND m.state = :state "
focal_class.modifier: private final static
focal_class.original_string: private final static String QUERY_CANDIDATE_MACHINES_RESERVED = //
          "SELECT m FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE m.id in (:reserveds) AND " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack " + //
              "AND m.state = :state ";
focal_class.type: String
focal_class.var_name: QUERY_CANDIDATE_MACHINES_RESERVED
focal_class.declarator: QUERY_CANDIDATE_MACHINES_RESERVED_HA_EXCLUDE_ORIGINAL = //
          "SELECT m FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE m.id in (:reserveds) AND " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack " + //
              "AND m.state = :state " + //
              "AND (m.enterprise is null OR m.enterprise.id = :enterpriseId) " + //
              "AND m.hypervisor.id <> :originalHypervisorId"
focal_class.modifier: private final static
focal_class.original_string: private final static String QUERY_CANDIDATE_MACHINES_RESERVED_HA_EXCLUDE_ORIGINAL = //
          "SELECT m FROM " + //
              "com.abiquo.server.core.infrastructure.Machine m, " + //
              "com.abiquo.server.core.cloud.VirtualDatacenter vdc " + //
              "WHERE m.id in (:reserveds) AND " + //
              "vdc.id = :idVirtualDataCenter " + //
              "AND m.hypervisor.type = vdc.hypervisorType " + //
              "AND m.rack.id = :idRack " + //
              "AND m.state = :state " + //
              "AND (m.enterprise is null OR m.enterprise.id = :enterpriseId) " + //
              "AND m.hypervisor.id <> :originalHypervisorId";
focal_class.type: String
focal_class.var_name: QUERY_CANDIDATE_MACHINES_RESERVED_HA_EXCLUDE_ORIGINAL
focal_class.declarator: QUERY_CANDIDATE_DATASTORE = //
          "  SELECT py.id FROM " + //
              "  com.abiquo.server.core.infrastructure.Datastore datastore, " + //
              "  com.abiquo.server.core.infrastructure.Machine py " + //
              "    WHERE py.id in (:candidates)" + //
              "    AND (datastore.size - datastore.usedSize) > :hdRequiredOnRepository " + //
              "    AND py in elements(datastore.machines) " + //
              "    AND datastore.size > datastore.usedSize " + //
              "    AND datastore.enabled = true"
focal_class.modifier: private final static
focal_class.original_string: private final static String QUERY_CANDIDATE_DATASTORE = //
          "  SELECT py.id FROM " + //
              "  com.abiquo.server.core.infrastructure.Datastore datastore, " + //
              "  com.abiquo.server.core.infrastructure.Machine py " + //
              "    WHERE py.id in (:candidates)" + //
              "    AND (datastore.size - datastore.usedSize) > :hdRequiredOnRepository " + //
              "    AND py in elements(datastore.machines) " + //
              "    AND datastore.size > datastore.usedSize " + //
              "    AND datastore.enabled = true";
focal_class.type: String
focal_class.var_name: QUERY_CANDIDATE_DATASTORE
focal_class.declarator: QUERY_CANDIDATE_DATASTORE_HA_DATASTOREUUID = //
          "  SELECT py.id FROM " + //
              "  com.abiquo.server.core.infrastructure.Datastore datastore, " + //
              "  com.abiquo.server.core.infrastructure.Machine py " + //
              "    WHERE py.id in (:candidates)" + //
              // "    AND (datastore.size - datastore.usedSize) > :hdRequiredOnRepository " + //
              "    AND py in elements(datastore.machines) " + //
              "    AND datastore.size > datastore.usedSize " + //
              "    AND datastore.enabled = true " + //
              "    AND datastore.datastoreUUID = :datastoreUuid"
focal_class.modifier: private final static
focal_class.original_string: private final static String QUERY_CANDIDATE_DATASTORE_HA_DATASTOREUUID = //
          "  SELECT py.id FROM " + //
              "  com.abiquo.server.core.infrastructure.Datastore datastore, " + //
              "  com.abiquo.server.core.infrastructure.Machine py " + //
              "    WHERE py.id in (:candidates)" + //
              // "    AND (datastore.size - datastore.usedSize) > :hdRequiredOnRepository " + //
              "    AND py in elements(datastore.machines) " + //
              "    AND datastore.size > datastore.usedSize " + //
              "    AND datastore.enabled = true " + //
              "    AND datastore.datastoreUUID = :datastoreUuid";
focal_class.type: String
focal_class.var_name: QUERY_CANDIDATE_DATASTORE_HA_DATASTOREUUID
focal_class.declarator: QUERY_IS_MACHINE_IN_ALLOCATOR =
          "SELECT vm FROM com.abiquo.server.core.cloud.VirtualMachine vm "
              + "join vm.hypervisor h join h.machine m WHERE m.id = :machineId "
              + "AND vm.state != 'RUNNING' AND vm.state != 'POWERED_OFF' "
              + "AND vm.state != 'PAUSED' AND vm.state != 'REBOOTED'"
focal_class.modifier: private static final
focal_class.original_string: private static final String QUERY_IS_MACHINE_IN_ALLOCATOR =
          "SELECT vm FROM com.abiquo.server.core.cloud.VirtualMachine vm "
              + "join vm.hypervisor h join h.machine m WHERE m.id = :machineId "
              + "AND vm.state != 'RUNNING' AND vm.state != 'POWERED_OFF' "
              + "AND vm.state != 'PAUSED' AND vm.state != 'REBOOTED'";
focal_class.type: String
focal_class.var_name: QUERY_IS_MACHINE_IN_ALLOCATOR
focal_class.declarator: QUERY_ALL_IDS_IN =
          "SELECT m.id "
              + "FROM com.abiquo.server.core.infrastructure.Machine m WHERE m.datacenter IN (:datacenters)"
focal_class.modifier: private static final
focal_class.original_string: private static final String QUERY_ALL_IDS_IN =
          "SELECT m.id "
              + "FROM com.abiquo.server.core.infrastructure.Machine m WHERE m.datacenter IN (:datacenters)";
focal_class.type: String
focal_class.var_name: QUERY_ALL_IDS_IN
focal_class.declarator: QUERY_TOTAL_USED_CORES = "SELECT sum(virtualCpuCores) "
          + "FROM com.abiquo.server.core.infrastructure.Machine"
focal_class.modifier: private static final
focal_class.original_string: private static final String QUERY_TOTAL_USED_CORES = "SELECT sum(virtualCpuCores) "
          + "FROM com.abiquo.server.core.infrastructure.Machine";
focal_class.type: String
focal_class.var_name: QUERY_TOTAL_USED_CORES
focal_class.declarator: QUERY_USED_CORES_EXCEPT_MACHINE = "SELECT sum(virtualCpuCores) "
          + "FROM com.abiquo.server.core.infrastructure.Machine WHERE id != :id"
focal_class.modifier: private static final
focal_class.original_string: private static final String QUERY_USED_CORES_EXCEPT_MACHINE = "SELECT sum(virtualCpuCores) "
          + "FROM com.abiquo.server.core.infrastructure.Machine WHERE id != :id";
focal_class.type: String
focal_class.var_name: QUERY_USED_CORES_EXCEPT_MACHINE
focal_class.file: model/src/main/java/com/abiquo/server/core/infrastructure/MachineDAO.java
focal_class.identifier: MachineDAO
focal_class.class_method_signature: MachineDAO.MachineDAO()
focal_class.full_signature: public  MachineDAO()
focal_class.identifier: MachineDAO
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  MachineDAO()
focal_class.class_method_signature: MachineDAO.MachineDAO(final EntityManager entityManager)
focal_class.full_signature: public  MachineDAO(final EntityManager entityManager)
focal_class.identifier: MachineDAO
focal_class.modifiers: public
focal_class.parameters: (final EntityManager entityManager)
focal_class.signature:  MachineDAO(final EntityManager entityManager)
focal_class.class_method_signature: MachineDAO.sameDatacenter(final Datacenter datacenter)
focal_class.full_signature: private static Criterion sameDatacenter(final Datacenter datacenter)
focal_class.identifier: sameDatacenter
focal_class.modifiers: private static
focal_class.parameters: (final Datacenter datacenter)
focal_class.return: Criterion
focal_class.signature: Criterion sameDatacenter(final Datacenter datacenter)
focal_class.class_method_signature: MachineDAO.sameRack(final Rack rack)
focal_class.full_signature: private static Criterion sameRack(final Rack rack)
focal_class.identifier: sameRack
focal_class.modifiers: private static
focal_class.parameters: (final Rack rack)
focal_class.return: Criterion
focal_class.signature: Criterion sameRack(final Rack rack)
focal_class.class_method_signature: MachineDAO.sameId(final Integer id)
focal_class.full_signature: private static Criterion sameId(final Integer id)
focal_class.identifier: sameId
focal_class.modifiers: private static
focal_class.parameters: (final Integer id)
focal_class.return: Criterion
focal_class.signature: Criterion sameId(final Integer id)
focal_class.class_method_signature: MachineDAO.sameName(final String name)
focal_class.full_signature: private static Criterion sameName(final String name)
focal_class.identifier: sameName
focal_class.modifiers: private static
focal_class.parameters: (final String name)
focal_class.return: Criterion
focal_class.signature: Criterion sameName(final String name)
focal_class.class_method_signature: MachineDAO.sameEnterprise(final Enterprise enterprise)
focal_class.full_signature: private Criterion sameEnterprise(final Enterprise enterprise)
focal_class.identifier: sameEnterprise
focal_class.modifiers: private
focal_class.parameters: (final Enterprise enterprise)
focal_class.return: Criterion
focal_class.signature: Criterion sameEnterprise(final Enterprise enterprise)
focal_class.class_method_signature: MachineDAO.sameState(final MachineState state)
focal_class.full_signature: private static Criterion sameState(final MachineState state)
focal_class.identifier: sameState
focal_class.modifiers: private static
focal_class.parameters: (final MachineState state)
focal_class.return: Criterion
focal_class.signature: Criterion sameState(final MachineState state)
focal_class.class_method_signature: MachineDAO.filterBy(final String filter)
focal_class.full_signature: private Criterion filterBy(final String filter)
focal_class.identifier: filterBy
focal_class.modifiers: private
focal_class.parameters: (final String filter)
focal_class.return: Criterion
focal_class.signature: Criterion filterBy(final String filter)
focal_class.class_method_signature: MachineDAO.findMachines(final Datacenter datacenter)
focal_class.full_signature: public List<Machine> findMachines(final Datacenter datacenter)
focal_class.identifier: findMachines
focal_class.modifiers: public
focal_class.parameters: (final Datacenter datacenter)
focal_class.return: List<Machine>
focal_class.signature: List<Machine> findMachines(final Datacenter datacenter)
focal_class.class_method_signature: MachineDAO.findRackMachines(final Rack rack)
focal_class.full_signature: public List<Machine> findRackMachines(final Rack rack)
focal_class.identifier: findRackMachines
focal_class.modifiers: public
focal_class.parameters: (final Rack rack)
focal_class.return: List<Machine>
focal_class.signature: List<Machine> findRackMachines(final Rack rack)
focal_class.class_method_signature: MachineDAO.findRackMachines(final Rack rack, final String filter)
focal_class.full_signature: public List<Machine> findRackMachines(final Rack rack, final String filter)
focal_class.identifier: findRackMachines
focal_class.modifiers: public
focal_class.parameters: (final Rack rack, final String filter)
focal_class.return: List<Machine>
focal_class.signature: List<Machine> findRackMachines(final Rack rack, final String filter)
focal_class.class_method_signature: MachineDAO.findMachinesWithHAInProgress()
focal_class.full_signature: public List<Machine> findMachinesWithHAInProgress()
focal_class.identifier: findMachinesWithHAInProgress
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Machine>
focal_class.signature: List<Machine> findMachinesWithHAInProgress()
focal_class.class_method_signature: MachineDAO.findRackEnabledForHAMachines(final Rack rack)
focal_class.full_signature: public List<Machine> findRackEnabledForHAMachines(final Rack rack)
focal_class.identifier: findRackEnabledForHAMachines
focal_class.modifiers: public
focal_class.parameters: (final Rack rack)
focal_class.return: List<Machine>
focal_class.signature: List<Machine> findRackEnabledForHAMachines(final Rack rack)
focal_class.class_method_signature: MachineDAO.findRackEnabledForHAMachinesInUcs(final UcsRack rack)
focal_class.full_signature: public List<Machine> findRackEnabledForHAMachinesInUcs(final UcsRack rack)
focal_class.identifier: findRackEnabledForHAMachinesInUcs
focal_class.modifiers: public
focal_class.parameters: (final UcsRack rack)
focal_class.return: List<Machine>
focal_class.signature: List<Machine> findRackEnabledForHAMachinesInUcs(final UcsRack rack)
focal_class.class_method_signature: MachineDAO.existsAnyWithDatacenterAndName(final Datacenter datacenter, final String name)
focal_class.full_signature: public boolean existsAnyWithDatacenterAndName(final Datacenter datacenter, final String name)
focal_class.identifier: existsAnyWithDatacenterAndName
focal_class.modifiers: public
focal_class.parameters: (final Datacenter datacenter, final String name)
focal_class.return: boolean
focal_class.signature: boolean existsAnyWithDatacenterAndName(final Datacenter datacenter, final String name)
focal_class.class_method_signature: MachineDAO.existsAnyOtherWithDatacenterAndName(final Machine machine, final String name)
focal_class.full_signature: public boolean existsAnyOtherWithDatacenterAndName(final Machine machine, final String name)
focal_class.identifier: existsAnyOtherWithDatacenterAndName
focal_class.modifiers: public
focal_class.parameters: (final Machine machine, final String name)
focal_class.return: boolean
focal_class.signature: boolean existsAnyOtherWithDatacenterAndName(final Machine machine, final String name)
focal_class.class_method_signature: MachineDAO.deleteRackMachines(final Rack rack)
focal_class.full_signature: public int deleteRackMachines(final Rack rack)
focal_class.identifier: deleteRackMachines
focal_class.modifiers: public
focal_class.parameters: (final Rack rack)
focal_class.return: int
focal_class.signature: int deleteRackMachines(final Rack rack)
focal_class.class_method_signature: MachineDAO.findCandidateMachines(final Integer idRack,
          final Integer idVirtualDatacenter, final Long hdRequiredOnDatastore,
          final Enterprise enterprise)
focal_class.full_signature: public List<Machine> findCandidateMachines(final Integer idRack,
          final Integer idVirtualDatacenter, final Long hdRequiredOnDatastore,
          final Enterprise enterprise)
focal_class.identifier: findCandidateMachines
focal_class.modifiers: public
focal_class.parameters: (final Integer idRack,
          final Integer idVirtualDatacenter, final Long hdRequiredOnDatastore,
          final Enterprise enterprise)
focal_class.return: List<Machine>
focal_class.signature: List<Machine> findCandidateMachines(final Integer idRack,
          final Integer idVirtualDatacenter, final Long hdRequiredOnDatastore,
          final Enterprise enterprise)
focal_class.class_method_signature: MachineDAO.findFirstCandidateMachines(final Integer idRack,
          final Integer idVirtualDatacenter, final Long hdRequiredOnDatastore,
          final Enterprise enterprise)
focal_class.full_signature: private List<Machine> findFirstCandidateMachines(final Integer idRack,
          final Integer idVirtualDatacenter, final Long hdRequiredOnDatastore,
          final Enterprise enterprise)
focal_class.identifier: findFirstCandidateMachines
focal_class.modifiers: private
focal_class.parameters: (final Integer idRack,
          final Integer idVirtualDatacenter, final Long hdRequiredOnDatastore,
          final Enterprise enterprise)
focal_class.return: List<Machine>
focal_class.signature: List<Machine> findFirstCandidateMachines(final Integer idRack,
          final Integer idVirtualDatacenter, final Long hdRequiredOnDatastore,
          final Enterprise enterprise)
focal_class.class_method_signature: MachineDAO.findFirstCandidateMachinesReservedRestricted(final Integer idRack,
          final Integer idVirtualDatacenter, final Long hdRequiredOnDatastore,
          final Enterprise enterprise)
focal_class.full_signature: private List<Machine> findFirstCandidateMachinesReservedRestricted(final Integer idRack,
          final Integer idVirtualDatacenter, final Long hdRequiredOnDatastore,
          final Enterprise enterprise)
focal_class.identifier: findFirstCandidateMachinesReservedRestricted
focal_class.modifiers: private
focal_class.parameters: (final Integer idRack,
          final Integer idVirtualDatacenter, final Long hdRequiredOnDatastore,
          final Enterprise enterprise)
focal_class.return: List<Machine>
focal_class.signature: List<Machine> findFirstCandidateMachinesReservedRestricted(final Integer idRack,
          final Integer idVirtualDatacenter, final Long hdRequiredOnDatastore,
          final Enterprise enterprise)
focal_class.class_method_signature: MachineDAO.findFirstCandidateMachinesReservedRestrictedHAExclude(
          final Integer idRack, final Integer idVirtualDatacenter, final Enterprise enterprise,
          final Integer originalHypervisorId)
focal_class.full_signature: protected List<Machine> findFirstCandidateMachinesReservedRestrictedHAExclude(
          final Integer idRack, final Integer idVirtualDatacenter, final Enterprise enterprise,
          final Integer originalHypervisorId)
focal_class.identifier: findFirstCandidateMachinesReservedRestrictedHAExclude
focal_class.modifiers: protected
focal_class.parameters: (
          final Integer idRack, final Integer idVirtualDatacenter, final Enterprise enterprise,
          final Integer originalHypervisorId)
focal_class.return: List<Machine>
focal_class.signature: List<Machine> findFirstCandidateMachinesReservedRestrictedHAExclude(
          final Integer idRack, final Integer idVirtualDatacenter, final Enterprise enterprise,
          final Integer originalHypervisorId)
focal_class.class_method_signature: MachineDAO.findCandidateMachines(final Integer idRack,
          final Integer idVirtualDatacenter, final Enterprise enterprise, final String datastoreUuid,
          final Integer originalHypervisorId)
focal_class.full_signature: public List<Machine> findCandidateMachines(final Integer idRack,
          final Integer idVirtualDatacenter, final Enterprise enterprise, final String datastoreUuid,
          final Integer originalHypervisorId)
focal_class.identifier: findCandidateMachines
focal_class.modifiers: public
focal_class.parameters: (final Integer idRack,
          final Integer idVirtualDatacenter, final Enterprise enterprise, final String datastoreUuid,
          final Integer originalHypervisorId)
focal_class.return: List<Machine>
focal_class.signature: List<Machine> findCandidateMachines(final Integer idRack,
          final Integer idVirtualDatacenter, final Enterprise enterprise, final String datastoreUuid,
          final Integer originalHypervisorId)
focal_class.class_method_signature: MachineDAO.whyNotCandidateMachines(final Integer idRack, final Integer idVirtualDatacenter,
          final Long hdRequiredOnDatastore, final Enterprise enterprise, final List<Integer> reserveds)
focal_class.full_signature: private void whyNotCandidateMachines(final Integer idRack, final Integer idVirtualDatacenter,
          final Long hdRequiredOnDatastore, final Enterprise enterprise, final List<Integer> reserveds)
focal_class.identifier: whyNotCandidateMachines
focal_class.modifiers: private
focal_class.parameters: (final Integer idRack, final Integer idVirtualDatacenter,
          final Long hdRequiredOnDatastore, final Enterprise enterprise, final List<Integer> reserveds)
focal_class.return: void
focal_class.signature: void whyNotCandidateMachines(final Integer idRack, final Integer idVirtualDatacenter,
          final Long hdRequiredOnDatastore, final Enterprise enterprise, final List<Integer> reserveds)
focal_class.class_method_signature: MachineDAO.findReservedMachines(final Enterprise enterprise)
focal_class.full_signature: public List<Machine> findReservedMachines(final Enterprise enterprise)
focal_class.identifier: findReservedMachines
focal_class.modifiers: public
focal_class.parameters: (final Enterprise enterprise)
focal_class.return: List<Machine>
focal_class.signature: List<Machine> findReservedMachines(final Enterprise enterprise)
focal_class.class_method_signature: MachineDAO.findReservedMachine(final Enterprise enterprise, final Integer machineId)
focal_class.full_signature: public Machine findReservedMachine(final Enterprise enterprise, final Integer machineId)
focal_class.identifier: findReservedMachine
focal_class.modifiers: public
focal_class.parameters: (final Enterprise enterprise, final Integer machineId)
focal_class.return: Machine
focal_class.signature: Machine findReservedMachine(final Enterprise enterprise, final Integer machineId)
focal_class.class_method_signature: MachineDAO.reserveMachine(final Machine machine, final Enterprise enterprise)
focal_class.full_signature: public void reserveMachine(final Machine machine, final Enterprise enterprise)
focal_class.identifier: reserveMachine
focal_class.modifiers: public
focal_class.parameters: (final Machine machine, final Enterprise enterprise)
focal_class.return: void
focal_class.signature: void reserveMachine(final Machine machine, final Enterprise enterprise)
focal_class.class_method_signature: MachineDAO.releaseMachine(final Machine machine)
focal_class.full_signature: public void releaseMachine(final Machine machine)
focal_class.identifier: releaseMachine
focal_class.modifiers: public
focal_class.parameters: (final Machine machine)
focal_class.return: void
focal_class.signature: void releaseMachine(final Machine machine)
focal_class.class_method_signature: MachineDAO.findByIds(final Integer datacenterId, final Integer rackId,
          final Integer machineId)
focal_class.full_signature: public Machine findByIds(final Integer datacenterId, final Integer rackId,
          final Integer machineId)
focal_class.identifier: findByIds
focal_class.modifiers: public
focal_class.parameters: (final Integer datacenterId, final Integer rackId,
          final Integer machineId)
focal_class.return: Machine
focal_class.signature: Machine findByIds(final Integer datacenterId, final Integer rackId,
          final Integer machineId)
focal_class.class_method_signature: MachineDAO.findByIp(final Datacenter datacenter, final String ip)
focal_class.full_signature: public Machine findByIp(final Datacenter datacenter, final String ip)
focal_class.identifier: findByIp
focal_class.modifiers: public
focal_class.parameters: (final Datacenter datacenter, final String ip)
focal_class.return: Machine
focal_class.signature: Machine findByIp(final Datacenter datacenter, final String ip)
focal_class.class_method_signature: MachineDAO.findAllIds()
focal_class.full_signature: public Set<Integer> findAllIds()
focal_class.identifier: findAllIds
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<Integer>
focal_class.signature: Set<Integer> findAllIds()
focal_class.class_method_signature: MachineDAO.findAllIdsInDatacenters(final Datacenter... datacenters)
focal_class.full_signature: public List<Integer> findAllIdsInDatacenters(final Datacenter... datacenters)
focal_class.identifier: findAllIdsInDatacenters
focal_class.modifiers: public
focal_class.parameters: (final Datacenter... datacenters)
focal_class.return: List<Integer>
focal_class.signature: List<Integer> findAllIdsInDatacenters(final Datacenter... datacenters)
focal_class.class_method_signature: MachineDAO.getTotalUsedCores()
focal_class.full_signature: public Long getTotalUsedCores()
focal_class.identifier: getTotalUsedCores
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Long
focal_class.signature: Long getTotalUsedCores()
focal_class.class_method_signature: MachineDAO.getTotalUsedCoresExceptMachine(final Machine machine)
focal_class.full_signature: public Long getTotalUsedCoresExceptMachine(final Machine machine)
focal_class.identifier: getTotalUsedCoresExceptMachine
focal_class.modifiers: public
focal_class.parameters: (final Machine machine)
focal_class.return: Long
focal_class.signature: Long getTotalUsedCoresExceptMachine(final Machine machine)
focal_class.superclass: extends DefaultDAOBase<Integer, Machine>
focal_method.body: public int deleteRackMachines(final Rack rack)
      {
          assert rack != null;
          assert isManaged2(rack);
  
          Collection<Machine> machines = findRackMachines(rack);
          for (Machine machine : machines)
          {
              remove(machine);
          }
          return machines.size();
      }
focal_method.class_method_signature: MachineDAO.deleteRackMachines(final Rack rack)
focal_method.full_signature: public int deleteRackMachines(final Rack rack)
focal_method.identifier: deleteRackMachines
focal_method.invocations: isManaged2 findRackMachines remove size
focal_method.modifiers: public
focal_method.parameters: (final Rack rack)
focal_method.return: int
focal_method.signature: int deleteRackMachines(final Rack rack)