@Test public void testGetHostList() { System.out.println("getHostList"); DataGatherer instance = getDataGatherer(); HashMap<String, Host> result = instance.getHostList(); assert (!result.isEmpty()); }
private List<Host> getHostList(List<EnergyUsageSource> input) { ArrayList<Host> answer = new ArrayList<>(); for (EnergyUsageSource item : input) { if (item.getClass().equals(Host.class)) { answer.add((Host) item); } } return answer; }
DataGatherer implements Runnable { private List<Host> getHostList(List<EnergyUsageSource> input) { ArrayList<Host> answer = new ArrayList<>(); for (EnergyUsageSource item : input) { if (item.getClass().equals(Host.class)) { answer.add((Host) item); } } return answer; } }
DataGatherer implements Runnable { private List<Host> getHostList(List<EnergyUsageSource> input) { ArrayList<Host> answer = new ArrayList<>(); for (EnergyUsageSource item : input) { if (item.getClass().equals(Host.class)) { answer.add((Host) item); } } return answer; } DataGatherer(HostDataSource datasource, DatabaseConnector connector, Calibrator calibrator); }
DataGatherer implements Runnable { private List<Host> getHostList(List<EnergyUsageSource> input) { ArrayList<Host> answer = new ArrayList<>(); for (EnergyUsageSource item : input) { if (item.getClass().equals(Host.class)) { answer.add((Host) item); } } return answer; } DataGatherer(HostDataSource datasource, DatabaseConnector connector, Calibrator calibrator); void stop(); double getGeneralPurposeHostsPowerConsumption(); @Override void run(); void setRule(EnergyShareRule rule); HashMap<String, Host> getHostList(); HashMap<String, GeneralPurposePowerConsumer> getGeneralPurposeHostList(); Host getHost(String hostname); HashMap<String, VmDeployed> getVmList(); HashSet<VmDeployed> getVmList(String deploymentId); VmDeployed getVm(String name); VmDeployed getVm(int vmId); boolean setVm(VmDeployed vm); ArrayList<VmDeployed> getVMsOnHost(Host host); ArrayList<VmDeployed> getVMsOnHost(Host host, List<VmDeployed> activeVMs); void setPerformDataGathering(boolean performDataGathering); boolean performDataGathering(); }
DataGatherer implements Runnable { private List<Host> getHostList(List<EnergyUsageSource> input) { ArrayList<Host> answer = new ArrayList<>(); for (EnergyUsageSource item : input) { if (item.getClass().equals(Host.class)) { answer.add((Host) item); } } return answer; } DataGatherer(HostDataSource datasource, DatabaseConnector connector, Calibrator calibrator); void stop(); double getGeneralPurposeHostsPowerConsumption(); @Override void run(); void setRule(EnergyShareRule rule); HashMap<String, Host> getHostList(); HashMap<String, GeneralPurposePowerConsumer> getGeneralPurposeHostList(); Host getHost(String hostname); HashMap<String, VmDeployed> getVmList(); HashSet<VmDeployed> getVmList(String deploymentId); VmDeployed getVm(String name); VmDeployed getVm(int vmId); boolean setVm(VmDeployed vm); ArrayList<VmDeployed> getVMsOnHost(Host host); ArrayList<VmDeployed> getVMsOnHost(Host host, List<VmDeployed> activeVMs); void setPerformDataGathering(boolean performDataGathering); boolean performDataGathering();  }