@Test public void hostIsIdle() { for (Host host: clusterState.getHosts()) { if (host.getId() == (long) 1) { assertFalse(clusterState.hostIsIdle(host)); } else { assertTrue(clusterState.hostIsIdle(host)); } } }
public boolean hostIsIdle(Host host) { return getIdleHosts().contains(host); }
ClusterState extends AbstractPersistable implements Solution<Score> { public boolean hostIsIdle(Host host) { return getIdleHosts().contains(host); } }
ClusterState extends AbstractPersistable implements Solution<Score> { public boolean hostIsIdle(Host host) { return getIdleHosts().contains(host); } ClusterState(); }
ClusterState extends AbstractPersistable implements Solution<Score> { public boolean hostIsIdle(Host host) { return getIdleHosts().contains(host); } ClusterState(); boolean hostIsIdle(Host host); int countIdleHosts(); int countNonIdleHosts(); List<String> getIdsOfAppsDeployedInHost(Host host); List<Vm> getVmsDeployedInHost(Host host); double avgCpusAssignedPerHost(); int cpusAssignedInHost(Host host); int calculateCumulativeUnusedCpuPerc(); double calculateStdDevCpuPercUsedPerHost(); int countOffHosts(); int countVmMigrationsNeeded(ClusterState destinyClusterState); Vm getVmById(long id); @PlanningEntityCollectionProperty List<Vm> getVms(); void setVms(List<Vm> vms); @ValueRangeProvider(id = "hostRange") List<Host> getHosts(); void setHosts(List<Host> hosts); @Override Score getScore(); @Override void setScore(Score score); @Override Collection<?> getProblemFacts(); @Override String toString(); }
ClusterState extends AbstractPersistable implements Solution<Score> { public boolean hostIsIdle(Host host) { return getIdleHosts().contains(host); } ClusterState(); boolean hostIsIdle(Host host); int countIdleHosts(); int countNonIdleHosts(); List<String> getIdsOfAppsDeployedInHost(Host host); List<Vm> getVmsDeployedInHost(Host host); double avgCpusAssignedPerHost(); int cpusAssignedInHost(Host host); int calculateCumulativeUnusedCpuPerc(); double calculateStdDevCpuPercUsedPerHost(); int countOffHosts(); int countVmMigrationsNeeded(ClusterState destinyClusterState); Vm getVmById(long id); @PlanningEntityCollectionProperty List<Vm> getVms(); void setVms(List<Vm> vms); @ValueRangeProvider(id = "hostRange") List<Host> getHosts(); void setHosts(List<Host> hosts); @Override Score getScore(); @Override void setScore(Score score); @Override Collection<?> getProblemFacts(); @Override String toString();  }