Author: rob.stryker(a)jboss.com
Date: 2011-02-24 00:43:06 -0500 (Thu, 24 Feb 2011)
New Revision: 29303
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
Log:
JBIDE-8343 to maintenance branch
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
---
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-02-24
05:25:50 UTC (rev 29302)
+++
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-02-24
05:43:06 UTC (rev 29303)
@@ -36,7 +36,7 @@
* @author André Dietisheim
*/
public class DeltaCloud extends ObservablePojo {
-
+ private static final int WAIT_FOR_STATE_DELAY = 4000;
public static final String PROP_INSTANCES = "instances";
public static final String PROP_INSTANCES_REMOVED = "instancesRemoved";
public static final String PROP_IMAGES = "images";
@@ -315,12 +315,12 @@
DeltaCloudInstance instance = getInstancesRepository().getById(instanceId);
if (instance != null) {
while (!pm.isCanceled()) {
+ Thread.sleep(WAIT_FOR_STATE_DELAY);
+ instance = refreshInstance(instance);
if (stateMatcher.matchesState(instance, instance.getState())
|| instance.getState().equals(DeltaCloudInstance.State.TERMINATED)) {
return instance;
}
- Thread.sleep(400);
- instance = refreshInstance(instance);
}
}
return instance;
@@ -478,7 +478,7 @@
return deltaCloudInstance;
} catch (DeltaCloudClientException e) {
// TODO : internationalize strings
- throw new DeltaCloudException(MessageFormat.format("Coud not refresh instance
\"{0}\"",
+ throw new DeltaCloudException(MessageFormat.format("Could not refresh instance
\"{0}\"",
deltaCloudInstance.getId()), e);
}
}
Show replies by date