List of usage examples for com.amazonaws.services.ec2.model InstanceStateName fromValue
public static InstanceStateName fromValue(String value)
From source file:org.apache.airavata.core.gfac.provider.impl.EC2Provider.java
License:Apache License
private boolean anyInstancesStateEqual(List<Instance> instances, InstanceStateName name) { for (Iterator<Instance> iterator = instances.iterator(); iterator.hasNext();) { Instance instance = (Instance) iterator.next(); // if one of instance is not running, return false if (InstanceStateName.fromValue(instance.getState().getName()) == name) { return true; }// w w w. j av a2 s .c o m } return false; }
From source file:org.apache.airavata.core.gfac.provider.impl.EC2Provider.java
License:Apache License
private boolean allInstancesStateEqual(List<Instance> instances, InstanceStateName name) { for (Iterator<Instance> iterator = instances.iterator(); iterator.hasNext();) { Instance instance = (Instance) iterator.next(); // if one of instance is not running, return false if (InstanceStateName.fromValue(instance.getState().getName()) != name) { return false; }/* ww w . j a v a2 s . co m*/ } return true; }
From source file:org.apache.airavata.gfac.ec2.util.AmazonEC2Util.java
License:Apache License
public static boolean anyInstancesStateEqual(List<Instance> instances, InstanceStateName name) { for (Instance instance : instances) { // if one of instance is not running, return false if (InstanceStateName.fromValue(instance.getState().getName()) == name) { return true; }//from www . ja v a 2 s .co m } return false; }
From source file:org.apache.airavata.gfac.ec2.util.AmazonEC2Util.java
License:Apache License
public static boolean allInstancesStateEqual(List<Instance> instances, InstanceStateName name) { for (Instance instance : instances) { // if one of instance is not running, return false if (InstanceStateName.fromValue(instance.getState().getName()) != name) { return false; }//from w w w . ja v a2 s .co m } return true; }